Developers

Improve an image prompt (1 Credit)

POST
/generations/prompt-improvements

Returns a suggested rewrite of an image prompt for the given composition (x-carousel or general). Costs 1 Credit, charged only when a valid suggestion is returned; a failed request charges nothing. With an Idempotency Key a retry replays the first suggestion without a second charge. Nothing is generated.

Send an Idempotency-Key to make retries safe: the same key with the same body returns the first result, with a different body 409.

Authorization

headerAuthorizationBearer <token>

An API Key the User creates in account settings, sent as Authorization: Bearer <key>. It holds the Scopes chosen at creation.

Header Parameters

Idempotency-Key?string

A client key, unique per request.

Length1 <= length <= 255

Request Body

application/json
  1. body
prompt*string
Length1 <= length <= 3000
composition*string
Value in"x-carousel""general"

Response Body

Success.

application/json
  1. response
prompt*string
chargedCredits*integer
Range0 < value <= 9007199254740991
Example request
curl -X POST 'https://ximagesplitter.com/api/v1/generations/prompt-improvements' \
  -H 'Content-Type: application/json' \
  -d '{
  "prompt": "string",
  "composition": "x-carousel"
}'
Example response
{
  "prompt": "string",
  "chargedCredits": 1
}