Files
membank/.trae/skills/image-tools/references/doubao-api-reference.md

77 lines
1.7 KiB
Markdown

# Volcengine Ark Image API Reference
## Endpoint
`POST https://ark.cn-beijing.volces.com/api/v3/images/generations`
## Authentication
```
Authorization: Bearer ark-119a37ed-f123-42fc-aea6-b38d47d47fc0-f7ddf
```
## Response Format
### Success Response (response_format: "url")
```json
{
"created": 1234567890,
"data": [
{
"url": "https://...",
"revision": 0
}
]
}
```
### Success Response (response_format: "b64_json")
```json
{
"created": 1234567890,
"data": [
{
"b64_json": "...",
"revision": 0
}
]
}
```
### Error Response
```json
{
"error": {
"code": "invalid_request_error",
"message": "..."
}
}
```
## Available Models
| Model ID | Capabilities | Max Size |
|---|---|---|
| `doubao-seedream-5-0-260128` | Text-to-image, image-to-image, multi-image fusion, editing, batch | 2K |
| `doubao-seedream-4-5-t2i` | Text-to-image, image-to-image, multi-image fusion | 4K |
| `doubao-seedream-4-0-t2i` | Text-to-image, image-to-image, multi-image fusion | 4K |
| `doubao-seedream-5-0-lite-t2i` | Text-to-image, batch, web search | 3K |
| `doubao-seedream-3-0-t2i` | Text-to-image (with seed/guidance_scale) | 2K |
| `doubao-seededit-3-0-i2i` | Dedicated image editing (with seed/guidance_scale) | adaptive |
## Image Input Formats
- **URL**: Publicly accessible HTTP/HTTPS URL
- **Base64**: `data:image/<format>;base64,<encoded_data>`
- Format must be lowercase: `data:image/png;base64,...` (not `PNG`)
- Supported formats: png, jpeg, webp
## Size Constraints
- Pixel range: `[1280, 4096]` for both width and height
- Max aspect ratio: 3:1 (long edge to short edge)
- Custom size format: `"WIDTHxHEIGHT"` (e.g., `"2048x1024"`)