Skip to main content
AnyFast is compatible with the Volcengine Ark Chat API. If you’re already using the Ark SDK or calling the Ark API directly, switching to AnyFast requires only a base URL change — no code rewrite needed.

Endpoints

POST https://www.anyfast.ai/v1/chat/completions
POST https://www.anyfast.ai/v1/responses

Authentication

Authorization: Bearer YOUR_API_KEY

Supported models

ModelDescription
doubao-seed-2.0-proDoubao Seed 2.0 Pro — most capable
doubao-seed-2.0-codeDoubao Seed 2.0 Code — optimized for coding
doubao-seed-2.0-liteDoubao Seed 2.0 Lite — balanced
doubao-seed-2.0-miniDoubao Seed 2.0 Mini — fast and lightweight
doubao-seed-1-8-251228Doubao Seed 1.8
doubao-seed-1-6-flash-250828Doubao Seed 1.6 Flash — fast inference
doubao-seed-1-6-251015Doubao Seed 1.6
doubao-seed-1-6-lite-251015Doubao Seed 1.6 Lite
doubao-seed-1-6-vision-250815Doubao Seed 1.6 Vision — multimodal
glm-4-7-251222GLM-4-7

Supported input types

ContentChat API typeChat API data fieldResponses API typeResponses API data field
Texttexttextinput_texttext
Imageimage_urlimage_url.urlinput_imageimage_url (string)
Videovideo_urlvideo_url.url + video_url.fpsinput_videovideo_url (string) + fps
Documentinput_filefile_url or file_data + filename
All content types support both URL and Base64 data URI formats.

Features

  • Streaming — Set stream: true for real-time token streaming via SSE
  • Function calling — Use the tools and tool_choice parameters
  • Reasoning — Models return reasoning_content with chain-of-thought
  • Vision — Send images via image_url / input_image content blocks
  • Video understanding — Send videos via video_url / input_video with optional fps control
  • Document understanding — Send PDF/documents via input_file (Responses API only)
  • Multi-turn conversations — Include full message history in messages / input

Chat Completions API

Text

curl https://www.anyfast.ai/v1/chat/completions \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "doubao-seed-2.0-pro",
    "messages": [
      {"role": "user", "content": "Hello!"}
    ]
  }'

Image (URL)

cURL
curl https://www.anyfast.ai/v1/chat/completions \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "doubao-seed-1-6-251015",
    "messages": [
      {
        "role": "user",
        "content": [
          {"type": "image_url", "image_url": {"url": "https://example.com/photo.jpg"}},
          {"type": "text", "text": "What is in this image?"}
        ]
      }
    ],
    "max_tokens": 100
  }'

Image (Base64)

cURL
curl https://www.anyfast.ai/v1/chat/completions \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "doubao-seed-1-6-251015",
    "messages": [
      {
        "role": "user",
        "content": [
          {"type": "image_url", "image_url": {"url": "data:image/png;base64,{BASE64_IMAGE}"}},
          {"type": "text", "text": "What is in this image?"}
        ]
      }
    ]
  }'

Video (URL + fps)

The fps parameter controls frame extraction rate (frames per second). Default: 1, range: 0.2–5.
cURL
curl https://www.anyfast.ai/v1/chat/completions \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "doubao-seed-1-6-251015",
    "messages": [
      {
        "role": "user",
        "content": [
          {"type": "video_url", "video_url": {"url": "https://example.com/clip.mp4", "fps": 2}},
          {"type": "text", "text": "What buildings appear in this video?"}
        ]
      }
    ],
    "max_tokens": 200
  }'

Video (Base64)

cURL
curl https://www.anyfast.ai/v1/chat/completions \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "doubao-seed-1-6-251015",
    "messages": [
      {
        "role": "user",
        "content": [
          {"type": "video_url", "video_url": {"url": "data:video/mp4;base64,{BASE64_VIDEO}"}},
          {"type": "text", "text": "What is in this video?"}
        ]
      }
    ]
  }'

Responses API

Text

cURL
curl https://www.anyfast.ai/v1/responses \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "doubao-seed-2.0-pro",
    "input": "Hello!"
  }'

Image (URL)

cURL
curl https://www.anyfast.ai/v1/responses \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "doubao-seed-1-6-251015",
    "input": [
      {
        "role": "user",
        "content": [
          {"type": "input_image", "image_url": "https://example.com/photo.jpg"},
          {"type": "input_text", "text": "What is in this image?"}
        ]
      }
    ]
  }'

Video (URL + fps)

cURL
curl https://www.anyfast.ai/v1/responses \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "doubao-seed-1-6-251015",
    "input": [
      {
        "role": "user",
        "content": [
          {"type": "input_video", "video_url": "https://example.com/clip.mp4", "fps": 1},
          {"type": "input_text", "text": "What is in this video?"}
        ]
      }
    ]
  }'

Document (URL)

Document understanding is only available via the Responses API.
cURL
curl https://www.anyfast.ai/v1/responses \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "doubao-seed-2.0-lite",
    "input": [
      {
        "role": "user",
        "content": [
          {"type": "input_file", "file_url": "https://example.com/document.pdf"},
          {"type": "input_text", "text": "Summarize this document"}
        ]
      }
    ]
  }'

Document (Base64)

cURL
curl https://www.anyfast.ai/v1/responses \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "doubao-seed-2.0-lite",
    "input": [
      {
        "role": "user",
        "content": [
          {"type": "input_file", "file_data": "data:application/pdf;base64,{BASE64_PDF}", "filename": "document.pdf"},
          {"type": "input_text", "text": "Summarize this document"}
        ]
      }
    ]
  }'

fps parameter

fpsUse case
0.2–0.5Static scenes, surveillance footage
1 (default)General purpose
2–5Fast action, sports, motion counting

File size limits

MethodImageVideoDocument
URL< 10 MB< 50 MB< 50 MB
Base64< 10 MB (body < 64 MB)< 50 MB (body < 64 MB)< 50 MB (body < 64 MB)

Streaming example

stream = client.chat.completions.create(
    model="doubao-seed-2.0-pro",
    messages=[
        {"role": "user", "content": "Write a short poem"}
    ],
    stream=True
)

for chunk in stream:
    if chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content, end="")