⌘K

Spark Dream 3.0

spark_dream_3_0

Spark Dream 3.0 generates high-quality images from text descriptions with advanced AI-powered creative control.

Authentication

authorization string required

All APIs require authentication via Bearer Token.

Get API Key:

Visit API Key Management Page to get your API Key.

Usage:

Add to request header:

Authorization: Bearer YOUR_API_KEY

Parameters

model string required

Model ID to use for the request

Value: spark_dream_3_0


prompt string required

Text prompt for image generation, supports both Chinese and English input

Do not use special symbols like $ except for ""
Image description tips: Use coherent natural language to describe the image content (subject + behavior + environment, etc.), and use short phrases to describe image aesthetics (style, color, lighting, composition, etc.)
Professional vocabulary: Recommend using source language or English for professional terms for more precise results
Image usage description: Recommend specifying image usage and type, e.g., PPT cover background, advertising poster design, documentary photography
Text layout: Place text content in double quotes "", and describe text size, font, color, style and position through instructions


use_pre_llm boolean

Enable text expansion. Will expand and optimize the input prompt. Recommended to enable if input prompt is short, recommended to disable if input prompt is long

Options: true, false

Default: false


seed integer

Random seed as the basis for determining the initial diffusion state. If the random seed is the same positive integer and other parameters are consistent, the generated images will most likely have consistent results

Default: -1 (random)


scale number

Affects the degree of text description influence

Range: 1 to 10

Default: 2.5


width integer

Width of the generated image

Recommended resolution around 1.3K for more delicate image quality and better balanced overall indicators
1K and 2K images perform relatively weaker
Recommended ratios and corresponding width*height for 1.3K:
1:1: 1328*1328
4:3: 1472*1104
3:2: 1584*1056
16:9: 1664*936
21:9: 2016*864
Width and height product less than 2048*2048 can produce images normally

Range: 512 to 2048

Default: 1328


height integer

Height of the generated image

Recommended resolution around 1.3K for more delicate image quality and better balanced overall indicators
1K and 2K images perform relatively weaker
Recommended ratios and corresponding width*height for 1.3K:
1:1: 1328*1328
4:3: 1472*1104
3:2: 1584*1056
16:9: 1664*936
21:9: 2016*864
Width and height product less than 2048*2048 can produce images normally

Range: 512 to 2048

Default: 1328


Polling

Since image generation takes time, you need to poll the task status after creation

The initial response returns the task ID and initial status. The actual generation results must be obtained through polling the task status endpoint

Response Format

error object

Error information. Only present when status is failed

code string

Error code

error_message string

Detailed error message


output array

Generation results. Only present when status is completed

content array

List of generated content

type string

Resource type

Value: image

url string

Generated content URL

size integer

Image size

jobId string

Remote task ID


usage object

Usage statistics. Only present when status is completed

cost string

Total cost in USD

discount number

Discount amount


metadata object

Metadata information


Error Codes

Error CodeDescription
003019001Prompt missing
003019002Invalid prompt length, must be 1-800 characters
003019003Invalid use_pre_llm parameter
003019004Invalid seed parameter, must be -1 or positive integer
003019005Invalid scale parameter, must be between 1-10
003019006Invalid width/height parameters, must be between 512-2048 and both must be provided
003019007Invalid aspect ratio, must be between 1:3 and 3:1
003019095Internal generation error
003019096Result parsing error
003019097HTTP error response
003019098Status check error
003019099Task creation error