Seedream Image Generation API
POST https://tokuse.com/v1/images/generations creates an image with Seedream and returns the result in the same response. There is no task ID to poll for this endpoint.
| Item | Value |
|---|---|
| Method and path | POST /v1/images/generations |
| Authentication | Authorization: Bearer $TOKUSE_API_KEY |
| Models | Seedream image models available to your account |
| Pricing | Tokuse pricing and the upstream provider console |
Endpoint and authentication
Send a Bearer token with a prompt and a model. The endpoint is synchronous. The HTTP request stays open while the image is generated and returns a URL when the image exists.
Models and size
Use the Seedream model ID listed for your Tokuse account. size examples include 1024x1024; available sizes depend on the model. Check the catalog and test the exact size before building a fixed template around it.
Request
curl https://tokuse.com/v1/images/generations \
-H "Authorization: Bearer $TOKUSE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "your-seedream-model",
"prompt": "Isometric illustration of one API gateway routing requests to several model providers",
"size": "1024x1024",
"n": 1
}'
Response
{
"created": 1763251200,
"data": [
{
"url": "https://example.com/temporary/generated-image.png"
}
]
}
Notes and limits
- The returned image URL is temporary. Download the file and copy it to your own storage before the URL expires; do not store the URL as the only reference to the asset.
- Generation is synchronous, so a client timeout should be longer than a normal chat timeout. A timeout does not always mean the upstream stopped working.
- Use a size supported by the selected Seedream model. If a size is rejected, check the model's supported dimensions rather than retrying the same request.
Billing
Prices are not fixed on this page. Image generation is billed per image, with the rate depending on the model and size. Use the Tokuse pricing page and the upstream provider console for current rates, and check /pricing before generating a large batch.