All models
ByteDance
Image
Available
Seedream 4.0 Text to Image
High-quality photorealistic image generation powered by Seedream4.0's advanced AI model
Text to Image
From 60 credits (≈ ₹60.00) per request.
Parameters
| Parameter | Type | Description |
|---|---|---|
promptRequired |
string | The text prompt used to generate the image (Max length: 5000 characters) max length 5000 |
image_size |
string | The size of the generated image. one of: "square", "square_hd", "portrait_4_3", "portrait_3_2", "portrait_16_9", "landscape_4_3", "landscape_3_2", "landscape_16_9", "landscape_21_9" · default "square_hd" |
image_resolution |
string | Final image resolution is determined by combining image_size (aspect ratio) and image_resolution (pixel scale).. one of: "1K", "2K", "4K" · default "1K" |
max_images |
number | Set this value (1–6) to cap how many images a single generation run can produce in one set—because they’re created in one shot rather than separate requests, you must also state the exact number you want in the prompt so both settings align. (Min: 1, Max: 6, Step: 1) (step: 1) min 1 · max 6 · default 1 |
seed |
integer | Random seed for reproducible results. Integer, up to 1000000. Omit for a random seed. max 1000000 |
nsfw_checker |
boolean | Defaults to false. When false, no additional content filtering is applied and results are returned directly by the model. |
What you get back
Files arrive in output.files[] as private links that expire, with their type and size.
Use it from your code
# 1. Create the task
curl https://nexus.promptscenes.in/api/v1/tasks \
-H "Authorization: Bearer $NEXUS_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"model": "seedream-4.0-text-to-image",
"input": {
"prompt": "A cinematic shot of a lighthouse at dawn",
"image_size": "square_hd",
"image_resolution": "1K",
"max_images": 1
},
"callback_url": "https://your-app.com/webhooks/nexus"
}'
# 2. Poll for the result
curl https://nexus.promptscenes.in/api/v1/tasks/TASK_ID \
-H "Authorization: Bearer $NEXUS_API_KEY"
import os, time, uuid, requests
API = "https://nexus.promptscenes.in/api/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['NEXUS_API_KEY']}"}
task = requests.post(
f"{API}/tasks",
headers={**HEADERS, "Idempotency-Key": str(uuid.uuid4())},
json={
"model": "seedream-4.0-text-to-image",
"input": {
"prompt": "A cinematic shot of a lighthouse at dawn",
"image_size": "square_hd",
"image_resolution": "1K",
"max_images": 1,
},
"callback_url": "https://your-app.com/webhooks/nexus",
},
).json()
while task["status"] not in ("succeeded", "failed", "cancelled"):
time.sleep(3)
task = requests.get(f"{API}/tasks/{task['id']}", headers=HEADERS).json()
print(task["status"], task.get("output"))
const API = "https://nexus.promptscenes.in/api/v1";
const headers = {
Authorization: `Bearer ${process.env.NEXUS_API_KEY}`,
"Content-Type": "application/json",
};
let task = await fetch(`${API}/tasks`, {
method: "POST",
headers: { ...headers, "Idempotency-Key": crypto.randomUUID() },
body: JSON.stringify({
"model": "seedream-4.0-text-to-image",
"input": {
"prompt": "A cinematic shot of a lighthouse at dawn",
"image_size": "square_hd",
"image_resolution": "1K",
"max_images": 1
},
"callback_url": "https://your-app.com/webhooks/nexus"
}),
}).then((r) => r.json());
while (!["succeeded", "failed", "cancelled"].includes(task.status)) {
await new Promise((r) => setTimeout(r, 3000));
task = await fetch(`${API}/tasks/${task.id}`, { headers }).then((r) => r.json());
}
console.log(task.status, task.output);
Request
{
"model": "seedream-4.0-text-to-image",
"input": {
"prompt": "A cinematic shot of a lighthouse at dawn",
"image_size": "square_hd",
"image_resolution": "1K",
"max_images": 1
}
}
Response
{
"id": "6f1c…",
"object": "task",
"model": "seedream-4.0-text-to-image",
"status": "succeeded",
"output": {
"files": [
{
"url": "https://…signed…",
"mime": "…",
"size": 0
}
]
},
"estimated_cost": "…",
"charged": "…"
}