Skip to main content
POST

Authorizations

string
required
All endpoints require authentication using a Bearer Token.Get the API Key:Visit the API Key management page to get your API Key.Add the following in the request header:

Body

string
required
Model name.Fixed value: "flux_2_pro"
object
required
Model parameter object.
string
required
Caller-defined task ID used for idempotent submission and querying results.
  • Length is 1-64 characters
  • Only letters, numbers, underscores, and hyphens are allowed
  • Cannot be reused under the same API Key

Billing

When the submission is successful, the estimated_credits in the response is the estimated credits used. After the task is completed, the actual credits used can be checked in the credits_used field of the query interface response. If the task generation fails, the system will automatically refund the pre-deducted credits for this task.

Response

string
Caller task ID, which can be used to query the result.
string
Initial status, fixed as "pending".
number
Estimated credit consumption.
string
Creation time, in ISO 8601 format.

Query Results

After submitting successfully, call with the same out_task_id:
The task status includes pending, processing, completed, and failed. After the task is completed, the result images are located in data.output, and the actual credits consumed are in data.credits_used.