Grok passesUnlimited Grok team
For accounts with a Grok team: mint unlimited Grok image and video keys for each member, each with its own number of parallel requests and an expiry, straight from your own systems.
Framewharf issues accounts with a Grok team a management key starting with fwteam_. Send it in the header Authorization: Bearer. The management key can only create, list, update and delete the team's keys, read the budget history and read the parallel requests left on sale; the member key it returns is the one that calls models, and it starts with sk-.
The team budget is a prepaid wallet. Creating a key immediately deducts its price, based on parallel requests and days: a 1-day key costs one seventh of a 7-day key with the same concurrency. Updating a key charges or refunds only the difference, deleting an active key refunds its remaining time, and an expired key is fully used. The remaining balance determines the largest key you can create.
Charges and refunds are computed from the exact number of seconds left on the key, so a key costs exactly the hours and days it ran. Every amount is rounded to the dong: charges round up, refunds round down. Every budget change is one row in the budget history, so the balance always reconciles to the dong.
Create a new key. All three fields are required:
The key field is returned only once, in this response. Hand it to the member to call the Grok image and video APIs like any other key. price_vnd is the amount just deducted from the budget, free_vnd is the remaining balance.
Returns the budget granted (budget_vnd), what the keys have consumed after refunds (allocated_vnd), the remaining balance (free_vnd, always budget_vnd − allocated_vnd) and every key on the team, newest first.
active is false once a key has expired; expired keys stay in the list until you delete them. refund_vnd is the amount you would get back by deleting the key at the moment of the read.
Update a key in place: the member keeps the key they already use. Send only the fields you want to change; omitted fields keep their value:
Changing concurrent without days keeps the expiry: raising it charges the added concurrency for the time left, lowering it refunds the removed concurrency for the time left. Sending days starts a new period: the full price of the new period is charged minus what remains of the old one (if the new period is cheaper, the difference is refunded) — extending, shortening and reopening a key all work this way. The example below upgrades a 5-request key with 6 days left to 8 requests for a new week.
Every amount uses the current price, including for keys created before a price change. charged_vnd and refunded_vnd are what this change charged or refunded, free_vnd is the balance afterwards. A change that charges requires enough balance; refunding changes and renames always succeed.
Delete a member's key. The key stops working immediately, its remaining time is refunded to the budget (expired keys get no refund), and the response is 204.
Returns the budget rows, newest first: each grant, key creation, key update or deletion refund is one row, with the balance right after it.
A positive amount_vnd adds to the balance, a negative one deducts. source is admin when Framewharf made the change, console or api when you did, and system for the opening rows written when the budget became a wallet. Row types:
The parallel requests still on sale right now, shared by every running key. Creating a key, raising concurrent or sending days for an expired key needs that many requests free; without them the request gets a 409.
available is the number of parallel requests that can still be added; open is false when none are left. The figure refreshes every 15 seconds, while creating or updating a key always checks again at that moment, so a request that fit available can still get a 409 if the room was just taken. Lowering, shortening and deleting a key always succeed.
Every error has the shape { "error": { "message": string } }.
https://framewharf.com/api/v1/grok-team/keysAuthorization: Bearer fwteam_...https://framewharf.com/api/v1/grok-team/keyshttps://framewharf.com/api/v1/grok-team/keys/{id}https://framewharf.com/api/v1/grok-team/keys/{id}https://framewharf.com/api/v1/grok-team/transactionshttps://framewharf.com/api/v1/grok-team/capacitycurl "https://framewharf.com/api/v1/grok-team/keys" \
-H "Authorization: Bearer fwteam_..." \
-H "Content-Type: application/json" \
-d '{
"name": "Customer A",
"concurrent": 5,
"days": 7
}'{
"id": "cm...",
"name": "Customer A",
"key": "sk-...",
"concurrent": 5,
"days": 7,
"expires_at": "2026-10-21T08:00:00.000Z",
"price_vnd": 2205000,
"free_vnd": 41895000
}curl "https://framewharf.com/api/v1/grok-team/keys" \
-H "Authorization: Bearer fwteam_..."{
"budget_vnd": 44100000,
"allocated_vnd": 2205000,
"free_vnd": 41895000,
"keys": [
{
"id": "cm...",
"name": "Customer A",
"concurrent": 5,
"days": 7,
"key_hint": "sk-...abcd",
"active": true,
"refund_vnd": 1890000,
"created_at": "2026-10-14T08:00:00.000Z",
"expires_at": "2026-10-21T08:00:00.000Z",
"last_used_at": null
}
]
}curl -X PATCH "https://framewharf.com/api/v1/grok-team/keys/cm..." \
-H "Authorization: Bearer fwteam_..." \
-H "Content-Type: application/json" \
-d '{ "concurrent": 8, "days": 7 }'{
"id": "cm...",
"name": "Customer A",
"concurrent": 8,
"active": true,
"expires_at": "2026-10-22T08:00:00.000Z",
"charged_vnd": 1638000,
"refunded_vnd": 0,
"free_vnd": 40257000
}curl -X DELETE "https://framewharf.com/api/v1/grok-team/keys/cm..." \
-H "Authorization: Bearer fwteam_..."curl "https://framewharf.com/api/v1/grok-team/transactions?limit=50" \
-H "Authorization: Bearer fwteam_..."{
"transactions": [
{
"id": "cm...",
"type": "key_update",
"source": "api",
"amount_vnd": -1638000,
"balance_after_vnd": 40257000,
"key_id": "cm...",
"key_name": "Customer A",
"description": "Sửa key Customer A: 5 → 8 luồng, hạn mới 7 ngày từ lúc sửa",
"created_at": "2026-10-15T08:00:00.000Z"
},
{
"id": "cm...",
"type": "key_create",
"source": "api",
"amount_vnd": -2205000,
"balance_after_vnd": 41895000,
"key_id": "cm...",
"key_name": "Customer A",
"description": "Tạo key Customer A: 5 luồng × 7 ngày",
"created_at": "2026-10-14T08:00:00.000Z"
},
{
"id": "cm...",
"type": "grant",
"source": "admin",
"amount_vnd": 44100000,
"balance_after_vnd": 44100000,
"key_id": null,
"key_name": null,
"description": "Cấp team Grok",
"created_at": "2026-10-13T08:00:00.000Z"
}
],
"next_cursor": null
}curl "https://framewharf.com/api/v1/grok-team/capacity" \
-H "Authorization: Bearer fwteam_..."{
"open": true,
"available": 120
}