Skip to main content
Fhddos exposes Doubao’s Seedream and SeedEdit image models through a single OpenAI-compatible endpoint: POST /v1/images/generations. You can generate images from text prompts, edit images using a reference, fuse multiple input images, and even stream results as they’re generated — all with your Fhddos API key and no VolcArk console setup.
export BASE_URL="https://aiapi.fhddos.com/v1"
export TOKEN="oh-xxxxxxxxxxxxxxxx"
Authorization: Bearer <TOKEN>
Content-Type: application/json

Available Models

Model NameCapabilities
doubao-seedream-4.5Text-to-image, image-to-image, multi-image fusion, sequential generation, streaming (SSE) — same feature set as 4.0 with improvements
doubao-seedream-4.5-nSame as above — per-image billing variant, ideal when using n for batch generation
doubao-seedream-4.0Text-to-image, image-to-image, multi-image fusion (2–10 inputs), sequential generation (up to 15 images), streaming (SSE)
doubao-seedream-4.0-nSame as above — per-image billing variant, ideal when using n for batch generation
doubao-seedream-3.0-t2iText-to-image with seed and guidance_scale control for reproducible outputs
doubao-seededit-3.0-i2iDedicated image-to-image editing
Use doubao-seedream-4.5 or doubao-seedream-4.0 as your default. Switch to doubao-seedream-3.0-t2i when you need deterministic outputs via seed, or to doubao-seededit-3.0-i2i for precise image editing tasks.

Endpoint

POST /v1/images/generations

Request Parameters

Standard OpenAI Fields

ParameterTypeRequiredDescription
modelstringModel name, e.g. doubao-seedream-4.0
promptstringImage description. Keep under 300 Chinese characters or 600 English words.
sizestringOutput dimensions, e.g. 1024x1024, 2K, 4K
nintegerNumber of independent images to generate (default: 1)
response_formatstringurl (default) or b64_json
qualitystringhigh or standard
stylestringvivid or natural

VolcArk Extension Fields

ParameterTypeSupported ModelsDescription
imagestring or string[]Seedream 4.0, SeedEdit 3.0Reference image(s) — URL or base64. Pass an array for multi-image fusion (2–10 images).
seedintegerSeedream 3.0, SeedEdit 3.0Random seed in [-1, 2147483647]. Use -1 for random.
sequential_image_generationstringSeedream 4.0Enable sequential composition: auto or disabled
sequential_image_generation_options.max_imagesintegerSeedream 4.0Max images in a sequential set (range: 1–15)
streambooleanSeedream 4.0Enable SSE streaming for progressive output
guidance_scalefloatSeedream 3.0, SeedEdit 3.0Text adherence strength (range: 1–10)
watermarkbooleanAllAdd a watermark to the output (default: true)
optimize_prompt_options.modestringSeedream 4.0Prompt optimization mode: standard (default) or fast
All unrecognized fields are forwarded as-is to the VolcArk upstream. Billing is calculated from resolution and image count — your client doesn’t need to provide extra metadata.

Examples

Text-to-Image

curl -X POST "$BASE_URL/images/generations" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "doubao-seedream-4.0",
    "prompt": "A cute panda eating bamboo in a sunlit forest, dappled light through the leaves",
    "size": "2048x2048",
    "response_format": "url"
  }'

Image-to-Image Editing (Single Reference)

Pass a image URL with doubao-seedream-4.0 to apply style or content transformations:
curl -X POST "$BASE_URL/images/generations" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "doubao-seedream-4.0",
    "prompt": "Convert this photo to a watercolor painting style",
    "image": "https://ark-project.tos-cn-beijing.volces.com/doc_image/seelite_first_frame.png",
    "size": "2048x2048"
  }'
For precise editing with adaptive sizing, use the dedicated SeedEdit model:
curl -X POST "$BASE_URL/images/generations" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "doubao-seededit-3.0-i2i",
    "prompt": "Change the background to a snowy mountain scene",
    "image": "https://example.com/original.jpg",
    "size": "adaptive",
    "guidance_scale": 7.5
  }'

Multi-Image Fusion (2–10 Inputs)

Pass an array of image URLs to blend styles or elements from multiple sources:
curl -X POST "$BASE_URL/images/generations" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "doubao-seedream-4.0",
    "prompt": "Blend the visual styles of these images into a single composition",
    "image": [
      "https://example.com/style-ref-1.jpg",
      "https://example.com/style-ref-2.jpg",
      "https://example.com/style-ref-3.jpg"
    ],
    "size": "2048x2048"
  }'

Sequential / Composition Generation

Generate a narrative-linked set of images in one request:
curl -X POST "$BASE_URL/images/generations" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "doubao-seedream-4.0",
    "prompt": "Four seasons landscape: spring blossom, summer green, autumn leaves, winter snow",
    "size": "1024x1024",
    "sequential_image_generation": "auto",
    "sequential_image_generation_options": {
      "max_images": 4
    }
  }'

Reproducible Output with Seed Control

Use doubao-seedream-3.0-t2i with a fixed seed to reproduce the same image:
curl -X POST "$BASE_URL/images/generations" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "doubao-seedream-3.0-t2i",
    "prompt": "Van Gogh style starry night over a mountain village",
    "size": "1024x1024",
    "seed": 12345,
    "guidance_scale": 7.5
  }'

Streaming Sequential Generation (SSE)

Use stream: true with doubao-seedream-4.0 to receive images progressively:
curl -N -X POST "$BASE_URL/images/generations" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -H "Accept: text/event-stream" \
  -d '{
    "model": "doubao-seedream-4.0",
    "prompt": "A city skyline at sunset from multiple angles",
    "size": "1024x1024",
    "stream": true,
    "sequential_image_generation": "auto",
    "sequential_image_generation_options": {
      "max_images": 4
    }
  }'
Streaming events follow this pattern:
Event TypeMeaning
image_generation.partial_succeededOne image in the set is ready
image_generation.partial_failedOne image failed (others continue)
image_generation.completedAll images processed, includes usage

Response Format

Standard (Non-Streaming)

{
  "created": 1589478378,
  "data": [
    {
      "url": "https://...",
      "size": "2048x2048"
    }
  ],
  "usage": {
    "output_tokens": 16384,
    "total_tokens": 16384
  }
}

Base64 Response

Set "response_format": "b64_json" to receive the image as a base64 string instead of a URL:
{
  "created": 1589478378,
  "data": [
    {
      "b64_json": "iVBORw0KGgoAAAANSUhEUgAA..."
    }
  ]
}

Frequently Asked Questions

Sequential generation (sequential_image_generation: auto) produces a set of content-related images — the model decides how many to generate (up to max_images) based on the prompt’s narrative. The n parameter generates n independent images from the same prompt, similar to a batch sample.
  • Seedream 4.5 / 4.0: Use resolution modes (1K, 2K, 4K) or exact dimensions like 2048x2048. Total pixel count must be between 921,600 and 16,777,216.
  • Seedream 3.0-t2i: Choose between 512x512 and 2048x2048.
  • SeedEdit 3.0-i2i: Use adaptive to match the input image dimensions automatically.
Generated image URLs are typically valid for 24 hours. Download and store images to your own storage before the expiry window.
Add "watermark": false to your request body. This requires the model and your account configuration to allow it.
Ensure image contains a publicly accessible HTTPS URL or a correctly encoded base64 string. For large images, compress them first to avoid exceeding upstream size limits.

Billing

Billing is based on the number of successfully generated images. Failed images are generally not charged. Check Model Pricing in the Fhddos console for the specific per-image rates for each Seedream model.