Fhddos exposes all Doubao, DeepSeek, and Kimi text and vision models through the same OpenAI-compatible interface you already know. Set your base URL to https://aiapi.fhddos.com/v1, authenticate with your Fhddos API key, and pass any Doubao model name in the model field — the platform handles routing, version mapping, and billing automatically.
Prerequisites
export BASE_URL="https://aiapi.fhddos.com/v1"
export TOKEN="oh-xxxxxxxxxxxxxxxx"
Every request requires these headers:
Authorization: Bearer <TOKEN>
Content-Type: application/json
Available Models
| Model Name | Best For |
|---|
doubao-seed-1.8 | General chat, deep reasoning |
doubao-seed-1.6 | Stable, compatible general chat |
doubao-seed-1.6-lite | Low-cost variant |
doubao-seed-1.6-flash | Speed-sensitive scenarios |
doubao-seed-1.6-vision | Image understanding / vision |
doubao-seed-1.6-thinking | Alias for doubao-seed-1.8 deep reasoning |
doubao-seed-code | Code generation and engineering |
doubao-seed-translation | Translation and multilingual writing |
deepseek-v3.2 | Advanced reasoning |
deepseek-v3.1 | Advanced reasoning (stable) |
deepseek-v3 | Open-source ecosystem compatible |
deepseek-r1-ark | Reasoning-enhanced chain-of-thought |
kimi-k2 | Chain-of-thought reasoning |
glm-4.7 | General chat (requires admin enablement) |
Use the lowercase short model names shown above. Fhddos automatically resolves them to versioned internal IDs (e.g. doubao-seed-1-8-251228). If you receive InvalidEndpointOrModel.NotFound, check that you haven’t pasted a long dated ID instead of the short API name.
Chat Completions
Basic Text Request
Send a standard chat message using doubao-seed-1.8:
curl -X POST "$BASE_URL/chat/completions" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"model": "doubao-seed-1.8",
"messages": [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Explain what a large language model is in three sentences."}
],
"temperature": 0.7
}'
The messages array is fully compatible with the OpenAI multi-turn format. Fhddos maps the model value to the correct upstream ID and aggregates usage statistics automatically.
Streaming (SSE)
Add "stream": true to receive incremental token output as Server-Sent Events:
curl -N -X POST "$BASE_URL/chat/completions" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: text/event-stream" \
-d '{
"model": "doubao-seed-1.6-flash",
"messages": [
{"role": "system", "content": "Reply concisely."},
{"role": "user", "content": "List 5 productivity tips."}
],
"stream": true
}'
Use curl -N to disable output buffering so you see tokens as they arrive. Any OpenAI-compatible SDK or SSE client works here without modification.
Doubao Seed and the aggregated DeepSeek / Kimi models all support function calling with the standard tools + tool_choice fields:
curl -X POST "$BASE_URL/chat/completions" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"model": "doubao-seed-1.8",
"messages": [
{"role": "user", "content": "What is the weather in Tokyo right now?"}
],
"tools": [
{
"type": "function",
"function": {
"name": "get_weather",
"description": "Get current weather for a city",
"parameters": {
"type": "object",
"properties": {
"city": {"type": "string", "description": "City name"}
},
"required": ["city"]
}
}
}
],
"tool_choice": "auto"
}'
JSON / Structured Output
Force structured JSON output by setting response_format:
curl -X POST "$BASE_URL/chat/completions" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"model": "doubao-seed-1.8",
"messages": [
{"role": "user", "content": "Return a JSON object with the top 3 programming languages and their key strengths."}
],
"response_format": {"type": "json_object"}
}'
Fhddos includes tool call usage in the usage field of the response automatically.
Vision / Multimodal Chat
When you use doubao-seed-1.6-vision, pass images alongside text in the content array using the image_url type:
curl -X POST "$BASE_URL/chat/completions" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"model": "doubao-seed-1.6-vision",
"messages": [
{
"role": "user",
"content": [
{"type": "text", "text": "Describe the main elements in this image."},
{
"type": "image_url",
"image_url": {
"url": "https://example.com/photo.jpg"
}
}
]
}
]
}'
The image can be a publicly accessible HTTPS URL or a base64 data URL. Usage and billing are automatically converted to tokens based on the multimodal pricing rules — no extra parameters needed.
Responses API
If you prefer the newer OpenAI POST /v1/responses interface, you can use it with all Doubao, DeepSeek, and Kimi models in exactly the same way.
Basic Responses Request
curl -X POST "$BASE_URL/responses" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"model": "doubao-seed-1.8",
"input": [
{
"role": "user",
"content": [
{"type": "text", "text": "Summarize the key points of transformer architecture in 3 bullet points."}
]
}
],
"response_format": {
"type": "json_schema"
}
}'
The input field accepts mixed content (text, images, tool results) in the same format as OpenAI’s Responses API. The output and usage fields in the response are fully compatible.
Streaming Responses
curl -N -X POST "$BASE_URL/responses" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: text/event-stream" \
-d '{
"model": "doubao-seed-1.8",
"input": "Walk me through why the sky is blue, step by step.",
"stream": true
}'
When stream: true, the server returns incremental response.* SSE events. Fhddos provides compatibility shims so existing OpenAI Chat Completions stream parsers continue to work.
SDK Examples
Python (OpenAI SDK)
Node.js (OpenAI SDK)
cURL (streaming)
from openai import OpenAI
client = OpenAI(
base_url="https://aiapi.fhddos.com/v1",
api_key="oh-xxxxxxxx"
)
response = client.chat.completions.create(
model="doubao-seed-1.8",
messages=[
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "What are the benefits of using an API gateway?"}
],
temperature=0.7
)
print(response.choices[0].message.content)
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://aiapi.fhddos.com/v1",
apiKey: "oh-xxxxxxxx",
});
const response = await client.chat.completions.create({
model: "doubao-seed-1.8",
messages: [
{ role: "system", content: "You are a helpful assistant." },
{ role: "user", content: "What are the benefits of using an API gateway?" },
],
});
console.log(response.choices[0].message.content);
curl -N -X POST "https://aiapi.fhddos.com/v1/chat/completions" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"model": "doubao-seed-1.6-flash",
"messages": [{"role": "user", "content": "Tell me a short story."}],
"stream": true
}'
As an API caller you don’t need to manage any of the following — Fhddos handles them transparently:
- VolcArk credentials, request signing, or base URL configuration
- Model version upgrades (Fhddos updates the internal mapping without changing the API name)
- Channel routing and load balancing
- Billing aggregation across models and tool calls