Developers
Start a generation
POST
Starts one Generation Job and charges its Credits when accepted. Inputs are public https URLs: a publicUrl from create_upload_target, or any public https URL. A failed generation refunds its Credits.
Asynchronous: Returns at once with the creationId; poll get_generation_status until status is succeeded or failed.
Send an Idempotency-Key to make retries safe: the same key with the same body returns the first result, with a different body 409.
header
AuthorizationBearer <token>An API Key the User creates in account settings, sent as Authorization: Bearer <key>. It holds the Scopes chosen at creation.
Idempotency-Key?stringA client key, unique per request.
Length
1 <= length <= 255application/json- body
submission*|||originalPrompt?stringLength
1 <= lengthSuccess.
application/json- response
creationId*stringstatus*stringValue in
"generating""succeeded""failed"remainingCredits?integerRange
-9007199254740991 <= value <= 9007199254740991curl -X POST 'https://ximagesplitter.com/api/v1/generations' \
-H 'Content-Type: application/json' \
-d '{
"submission": {
"mode": "image",
"modelKey": "seedream-5-5",
"prompt": "string",
"assets": [
{
"slotId": "string",
"url": "http://example.com"
}
],
"options": {
"property1": "string",
"property2": "string"
},
"operation": "text-to-image"
}
}'Example response
{
"creationId": "string",
"status": "generating",
"remainingCredits": -9007199254740991
}