Seedream 3.0 t2i Serverless API

Seedream V3 generates high-resolution, bilingual images in seconds, enhancing creative workflows and marketing effectiveness.

~5.80s
$0.037 per generation
 1import requests
 2import json
 3
 4url = "https://api.segmind.com/v1/seedream-v3-text-to-image"
 5headers = {
 6    "x-api-key": "YOUR_API_KEY",
 7    "Content-Type": "application/json"
 8}
 9
10data = {
11    "aspect_ratio": "16:9",
12    "prompt": "A flourishing zen garden with cherry blossoms next to a calm koi pond, under a moonlit sky.",
13    "seed": 12345,
14    "guidance_scale": 2.5
15}
16
17response = requests.post(url, headers=headers, json=data)
18
19if response.status_code == 200:
20    result = response.json()
21    print(json.dumps(result, indent=2))
22else:
23    print(f"Error: {response.status_code}")
24    print(response.text)

API Endpoint

POSThttps://api.segmind.com/v1/seedream-v3-text-to-image

Parameters

aspect_ratiorequired
string

Aspect ratio dictates the image dimensions. Use 16:9 for widescreen or 1:1 for square images.

Default: "16:9"
Allowed values :
"16:9""4:3""1:1""3:4""9:16"
promptrequired
string

Briefly describe your desired scene. Be specific for best results, like 'sunset city skyline with neon lights'.

guidance_scaleoptional
number

Guidance scale affects adherence to the prompt. Higher numbers increase prompt influence, up to 10.

Default: 2.5Range: 1 - 10
seedoptional
integer

Input seed ensures consistent results. Keep consistent for replicable art or change for new variations.

Range: 1 - 999999

Response Type

Returns: Text/JSON

Common Error Codes

The API returns standard HTTP status codes. Detailed error messages are provided in the response body.

400

Bad Request

Invalid parameters or request format

401

Unauthorized

Missing or invalid API key

403

Forbidden

Insufficient permissions

404

Not Found

Model or endpoint not found

406

Insufficient Credits

Not enough credits to process request

429

Rate Limited

Too many requests

500

Server Error

Internal server error

502

Bad Gateway

Service temporarily unavailable

504

Timeout

Request timed out