Overview
This endpoint provides text to image functionality using Volcengine official format.
Authentication
This endpoint requires authentication using a Bearer token with your API key.
Your API key in the format: Bearer YOUR_API_KEY
Request Body
model
string
default:"seedream-4-0-250828"
required
The model identifier for image generation/editing
Description of the desired image transformation or generation
Response format: “url” (image URL) or “b64_json” (base64 encoded)
Output image resolution. Options: adaptive, 1024x1024, 2K, 4K
Random seed for reproducible results
Controls adherence to the prompt. Range: 1.0-10.0, recommended: 3.0-7.0
Whether to add watermark to the generated image
Request Example
curl -X POST "https://gptproto.com/api/v3/images/generations" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "seedream-4-0-250828",
"prompt": "Fisheye lens, a cat'''s head, the picture shows the cat'''s facial features are distorted due to the shooting method.",
"response_format": "url",
"size": "adaptive",
"seed": 12,
"guidance_scale": 2.5,
"watermark": true
}'
Response
Successful response with image generation result{
"id": "img_xxxxxxxxxx",
"object": "image",
"created": 1234567890,
"model": "seedream-4-0-250828",
"data": [
{
"url": "https://example.com/generated_image.jpg",
"index": 0
}
],
"usage": {
"prompt_tokens": 10,
"total_tokens": 10
}
}
Error Responses
{
"error": {
"message": "Invalid request parameters",
"type": "invalid_request_error",
"code": "invalid_parameters"
}
}