Generate and edit images and videos through teamToken, one account for Nano Banana, GPT Image, Grok Image, Veo, Seedance and Kling...
teamToken is a gateway to more than 50 image and video models behind one API key, billed per generation. This skill covers three things: picking a model, knowing the cost before a run, and collecting the result without paying for it twice.
The MCP tools are connected (list_models, generate_image, edit_image,
generate_video, extend_video, get_job, get_balance). Use them. The server
is https://teamtoken.store/mcp.
No MCP tools, but there is a shell. Call the REST API at
https://api.teamtoken.store with the key from the TEAMTOKEN_KEY environment
variable. If it is empty, ask the user for a key from https://app.teamtoken.store.
Never echo the key back into the conversation or into files.
1. Take the model from the live catalog, not from memory. Ids and prices change.
list_models. It is free and needs no key.curl -s https://app.teamtoken.store/cabinet/api/public/media-modelsEach row has model, modality (image or video), billing_unit
(per_image or per_second) and unit_price_usd.
2. Work out the cost and tell the user. An image run costs the price times
n. A video costs the per-second price times the duration. If the user named no
budget and the estimate is above $1, ask before running.
3. Check that the model accepts the input. A mismatch fails the request:
| Task | Send | Models |
|---|---|---|
| Text to image | prompt |
every image model |
| Edit, restyle, same character | prompt + 1–4 images |
nano-banana-pro, nano-banana-2, grok-image, gpt-image-2-* |
| Text to video | prompt |
every video model |
| Image to video | prompt + image |
seedance, kling, veo, grok, omni-flash |
| Edit a video | prompt + video |
kling-3.0-edit-*, seedance-2-omni-* |
| Motion control | prompt + image (the character) + video (the motion) |
kling-3.0-motion-*, kling-2.6-motion-* |
Allowed video lengths depend on the family: veo 4, 6 or 8 seconds, omni-flash
4, 6, 8 or 10, seedance 4 to 15, kling 3 to 15, grok 6. When the id names a
length (omni-flash-6s, kling-2.1-10s-720p), use that one. Edit and motion
models take the length from the input video and ignore duration.
Pictures go in as JPG or PNG up to 10 MB each, video as MP4, MOV or WebM up to 100 MB. Pass https URLs, data-URLs or bare base64, and keep to one kind per request.
MCP: generate_image, or edit_image when there are source pictures. Both wait
until the image is ready and return it. There is nothing to poll.
REST:
curl -s https://api.teamtoken.store/v1/images/generations \
-H "Authorization: Bearer $TEAMTOKEN_KEY" -H "Content-Type: application/json" \
-d '{"model": "nano-banana-pro",
"prompt": "a red ceramic teapot on a worn oak table, morning window light",
"aspect_ratio": "1:1", "resolution": "1K"}' \
-o response.json
jq -r '.data[0].b64_json' response.json | base64 -d > image.png
To edit, or to keep a character, add "images": ["https://..."] with up to four
pictures to the same request.
When the provider is slow the reply is HTTP 202 with an id and
"status": "processing". That job is already paid for. Collect it with
GET /v1/images/jobs/{id} rather than sending the request again.
Save images right away. After 7 days the job answers with "archived": true and
an empty data, which means the result expired, not that the generation failed.
A clip takes from 30 seconds to a few minutes, so the call returns before it is done.
generate_video or extend_video returns a job id at once.
REST: POST /v1/videos with "wait": false returns {"id", "status"} with
HTTP 202.get_job. REST: GET /v1/videos/{id}.queued or processing, wait another 30 seconds and
check again. completed means done, failed means it stopped.curl -s https://api.teamtoken.store/v1/videos \
-H "Authorization: Bearer $TEAMTOKEN_KEY" -H "Content-Type: application/json" \
-d '{"model": "veo-3.1-fast-hd",
"prompt": "slow push-in on a lighthouse at dusk, waves breaking below",
"duration": 6, "aspect_ratio": "16:9", "wait": false}'
# {"id": "vid_...", "status": "processing", ...}
curl -s https://api.teamtoken.store/v1/videos/vid_... \
-H "Authorization: Bearer $TEAMTOKEN_KEY"
The finished file is served by the gateway and needs the same key, so opening the link in a browser gives 401. Download it with the header:
curl -L -H "Authorization: Bearer $TEAMTOKEN_KEY" -o result.mp4 \
https://api.teamtoken.store/v1/videos/vid_.../content
cost_usd is what was
charged, estimated_cost_usd is the amount held while a job runs. Report
cost_usd."cost_usd": 0. Change
the prompt or the input before the next attempt.402: the balance is short. Call get_balance (REST: GET /v1/balance), tell
the user how much is missing and point them to https://app.teamtoken.store/topup.401: the key is missing or wrong.GEMINI_RAI_MEDIA_FILTERED and other filter codes: the provider's safety filter
refused the content. The same prompt will be refused again, so rewrite it.INVALID_VIDEO_FILE: an edit or motion model was called without video.SYSTEM_ERROR: a temporary fault on the provider side. Retry once after a pause.