Skip to main content

Documentation Index

Fetch the complete documentation index at: https://apixo.ai/docs/llms.txt

Use this file to discover all available pages before exploring further.

Overview

Seedream 4.5 is a ByteDance image model for text-to-image generation and reference-guided image generation. It supports 2K and 4K output tiers, up to 10 images per request, and optional sequential image generation for connected image sets. Use this page when you are ready to call the API after trying the model in the APIXO playground.
CapabilityValue
Model IDseedream-4-5
Modestext-to-image, image-to-image
Prompt length1-5000 characters
Reference images1-14 URLs for image-to-image
Images per taskmax_images is required, 1-10
Resolution tiers2K, 4K
Aspect ratios1:1, 2:3, 3:2, 4:3, 3:4, 9:16, 16:9, 21:9
Sequential generationdisabled, auto

Endpoint and authentication

Base URL:
https://api.apixo.ai/api/v1
MethodEndpointPurpose
POST/generateTask/seedream-4-5Submit a generation task
GET/statusTask/seedream-4-5?taskId={taskId}Poll task status and retrieve results
All requests require your APIXO API key:
Authorization: Bearer YOUR_API_KEY
Submit requests also require:
Content-Type: application/json

Copy-paste async quickstart

This minimal request submits a text-to-image task and returns a taskId.
curl -X POST "https://api.apixo.ai/api/v1/generateTask/seedream-4-5" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "request_type": "async",
    "input": {
      "mode": "text-to-image",
      "prompt": "a cozy cyberpunk cafe with warm neon lights, ultra detailed",
      "max_images": 2,
      "resolution": "2K",
      "aspect_ratio": "16:9",
      "sequential_image_generation": "disabled"
    }
  }'
Successful response:
{
  "code": 200,
  "message": "success",
  "data": {
    "taskId": "task_12345678"
  }
}
Save the taskId; you need it to poll for the final result.

Poll for result

curl -X GET "https://api.apixo.ai/api/v1/statusTask/seedream-4-5?taskId=task_12345678" \
  -H "Authorization: Bearer YOUR_API_KEY"
Processing response:
{
  "code": 200,
  "message": "success",
  "data": {
    "taskId": "task_12345678",
    "state": "processing",
    "createTime": 1767965610929
  }
}
Success response:
{
  "code": 200,
  "message": "success",
  "data": {
    "taskId": "task_12345678",
    "state": "success",
    "resultJson": "{\"resultUrls\":[\"https://r2.apixo.ai/img1.png\",\"https://r2.apixo.ai/img2.png\"]}",
    "createTime": 1767965610929,
    "completeTime": 1767965652317,
    "costTime": 41388
  }
}
Failed response:
{
  "code": 200,
  "message": "success",
  "data": {
    "taskId": "task_12345678",
    "state": "failed",
    "failCode": "SensitiveContentDetected",
    "failMsg": "The input or output was flagged as sensitive. Please try again with different inputs.",
    "createTime": 1767965610929,
    "completeTime": 1767965620132
  }
}
Parse resultJson after state becomes success:
const payload = JSON.parse(data.resultJson);
const imageUrls = payload.resultUrls;

Request body

Text-to-image

{
  "request_type": "async",
  "input": {
    "mode": "text-to-image",
    "prompt": "a fox in watercolor style",
    "max_images": 1,
    "resolution": "2K",
    "aspect_ratio": "1:1",
    "sequential_image_generation": "disabled"
  }
}

Image-to-image

{
  "request_type": "async",
  "input": {
    "mode": "image-to-image",
    "prompt": "turn this scene into a warm sunrise illustration",
    "image_urls": [
      "https://example.com/reference-1.png",
      "https://example.com/reference-2.jpg"
    ],
    "max_images": 3,
    "resolution": "4K",
    "aspect_ratio": "3:4",
    "sequential_image_generation": "auto"
  }
}

Multi-image sequence

{
  "request_type": "async",
  "input": {
    "mode": "text-to-image",
    "prompt": "four connected storyboard frames of a small robot exploring a greenhouse",
    "max_images": 4,
    "resolution": "2K",
    "aspect_ratio": "16:9",
    "sequential_image_generation": "auto"
  }
}

Parameters

request_type
string
default:"async"
Result delivery mode. Use async for polling with statusTask, or callback for webhook delivery.
callback_url
string
Required when request_type is callback. Must be a public HTTPS URL that can receive the final task payload. See Webhooks.
input
object
required
Seedream 4.5 input parameters.
When aspect_ratio is provided, APIXO maps resolution and aspect_ratio to an exact upstream size:
Aspect ratio2K size4K size
1:12048x20484096x4096
2:31664x24963328x4992
3:22496x16644992x3328
3:41728x23043520x4704
4:32304x17284704x3520
9:161600x28483040x5504
16:92848x16005504x3040
21:93136x13446240x2656

Response format

Submit task response

POST /generateTask/seedream-4-5 returns a task ID when the task is accepted:
code
integer
API status code. 200 means the task was accepted.
message
string
Human-readable status message.
data.taskId
string
Unique task identifier used with the status endpoint.

Status response fields

taskId
string
Unique task identifier.
state
string
Current task state: pending, processing, success, or failed.
resultJson
string
JSON string containing the generated image URLs. Present when state is success.
failCode
string
Machine-readable failure code. Present when state is failed.
failMsg
string
Human-readable failure message. Present when state is failed.
createTime
integer
Task creation timestamp in Unix milliseconds.
completeTime
integer
Task completion timestamp in Unix milliseconds. Present after completion.
costTime
integer
Processing duration in milliseconds. Present after successful completion.
If at least one image succeeds, the task is returned as success and resultJson.resultUrls contains only the successful images. Any requested images that did not complete are not included in resultUrls.

Webhook callback mode

Use callback mode when your backend should receive the final result automatically instead of polling.
curl -X POST "https://api.apixo.ai/api/v1/generateTask/seedream-4-5" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "request_type": "callback",
    "callback_url": "https://your-server.com/webhooks/apixo",
    "input": {
      "mode": "text-to-image",
      "prompt": "a clean product photo of a ceramic teapot on soft stone",
      "max_images": 1,
      "resolution": "2K",
      "aspect_ratio": "1:1",
      "sequential_image_generation": "disabled"
    }
  }'
Successful callback payload:
{
  "code": 200,
  "message": "success",
  "data": {
    "taskId": "task_12345678",
    "state": "success",
    "resultJson": "{\"resultUrls\":[\"https://r2.apixo.ai/img1.png\"]}",
    "createTime": 1767965610929,
    "completeTime": 1767965652317,
    "costTime": 41388
  }
}
Failed callback payloads use code: 500, message: "failed", and include failCode / failMsg in data. See Webhooks for delivery requirements and retry behavior.

Billing

Seedream 4.5 is billed per successfully generated image.
UnitAPIXO price
Generated image$0.035 / image
The backend pre-charges max_images * unit price when the task is accepted. If fewer images complete successfully, the unused portion is refunded automatically. For current route and market comparison pricing, see Pricing.

Latency and polling

Actual latency may vary by prompt complexity, number of requested images, reference image count, and current provider queue load.
ResolutionTypical generation timeRecommended first pollPoll interval
2K25s-35s20s after task creation3s-5s
4K40s-55s30s after task creation5s
For high-concurrency production workloads, use callback mode to avoid frequent polling.
Seedream 4.5 streaming requests have an upstream processing timeout of about 180 seconds. If a task times out, retry with a simpler prompt, fewer reference images, or fewer requested images.
Result URLs are valid for 15 days. Download and store important outputs promptly. Rate limits and concurrency can vary by account, API key, and route. If you receive 429, slow down requests and retry with backoff. For account-level details, see System APIs.

Errors and troubleshooting

HTTP errors

CodeMeaningWhat to do
400Invalid request body, mode, parameter type, parameter value, or prompt lengthFix the request before retrying
401Missing or invalid API keyCheck the Authorization header
402Insufficient balance or quotaAdd balance or switch account/key
403Key or route cannot access the model, or content is blocked before task creationCheck permissions and input content
404Model route or task ID was not foundCheck the endpoint path and taskId
429Rate limit or concurrency limit reachedRetry with exponential backoff
500Server error or streaming finalization errorRetry with backoff
502Upstream provider errorRetry with backoff
504Upstream timeoutRetry, reduce input complexity, or use callback mode

Task failure codes

Fail codeMeaningWhat to do
SensitiveContentDetectedInput or output was flagged as sensitiveChange the prompt or reference images
InputOutputSensitiveContentDetectedInput or output failed safety checksUse different prompt or image inputs
PromptInvalidPrompt was invalid or rejected by the providerRewrite the prompt and retry
BadRequestRequired parameters were missing or malformed upstreamCheck mode, prompt, max_images, resolution, aspect_ratio, and image_urls
InvalidImageSizeA reference image size is unsupportedUse a different image size
ImageFormatIncorrectA reference image format could not be acceptedUse a direct JPEG, PNG, or WebP image URL
Upload errorA reference image is too largeCompress the image and retry
RateLimitExceededProvider-side rate limit reachedRetry later with backoff
TimeoutProvider processing timed outRetry with simpler inputs or fewer images
StreamErrorStreaming request failed after retriesRetry later
FinalizeErrorResult finalization failedRetry or contact support with the taskId
Validation errorUpstream rejected the request as invalidCheck all parameters and image URLs
UpstreamErrorProvider returned an unmapped failureRetry or contact support with the taskId

Common fixes

  • Missing mode: Include input.mode; routing requires text-to-image or image-to-image.
  • Missing max_images: Include input.max_images; it is required even when you only want one image.
  • Image-to-image errors: Include at least one public, direct URL in image_urls; the maximum is 14 URLs.
  • Unexpected aspect ratio: Omit aspect_ratio only if you want the provider to use the resolution tier without a forced ratio.
  • Partial output: If only some images complete, the task can still be success; parse resultUrls and use the returned URLs only. See Error Codes for the full error reference.