Skip to main content
POST
/
v1
/
images
/
generations
Text to Image
curl --request POST \
  --url https://gptproto.com/v1/images/generations \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "<string>",
  "prompt": "<string>",
  "response_format": "<string>",
  "size": "<string>",
  "seed": 123,
  "guidance_scale": 123,
  "watermark": true
}'
{
  "error": {
    "message": "Invalid signature",
    "type": "401"
  }
}

Overview

This endpoint provides text to image functionality.

Authentication

This endpoint requires authentication using a Bearer token.
Authorization
string
default:"sk-***********"
required
Your API key in the format: YOUR_API_KEY

Request Body

model
string
default:"doubao-seedream-3-0-t2i-250415"
required
The model to use for the request
prompt
string
required
Image generation prompt describing the desired image content
response_format
string
default:"url"
Response format: “url” (image URL) or “b64_json” (base64 encoded)
size
string
default:"1024x1024"
Output image resolution (e.g., 1024x1024, 2K, 4K)
seed
integer
default:"12"
Random seed for reproducible results
guidance_scale
number
default:"2.5"
Controls how closely the image follows the prompt (higher = more strict, typical range: 1.0-7.0)
watermark
boolean
default:"true"
Whether to add watermark to generated image

Request Example

curl -X POST "https://gptproto.com/v1/images/generations" \
  -H "Authorization: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "doubao-seedream-3-0-t2i-250415",
  "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": "1024x1024",
  "seed": 12,
  "guidance_scale": 2.5,
  "watermark": true
}'

Response

Success
200
Successful response
{
  "status": "success"
}

Error Responses

{
  "error": {
    "message": "Invalid signature",
    "type": "401"
  }
}