Skip to main content
POST
/
v2
/
image-utils
/
prompt-enhancer
cURL
curl --request POST \
  --url https://api.tokenkit.co/v2/image-utils/prompt-enhancer \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form 'instructions=<string>' \
  --form aspect_ratio=9:16 \
  --form effort=high \
  --form 'images=<string>' \
  --form images.0='@example-file' \
  --form images.2.items.0='@example-file'
{
  "data": {
    "job_id": "job_123",
    "links": {
      "self": "/v1/jobs/job_123",
      "stream": "/v1/jobs/job_123/stream"
    }
  },
  "errors": null
}

Request body

multipart/form-data (recommended when sending images)
  • instructions (string, required): Between 3 and 10,000 characters
  • aspect_ratio (validAspectRatios, optional)
  • effort ("high" | "low", optional): Defaults to "high"
  • images (file | file[], optional): Single image or up to 10 images, each max 30MB

Validation rules

  • images accepts either:
    • a single image
    • an array of images (max 10)
  • Input is normalized to an array internally when provided

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

multipart/form-data
instructions
string
required
Required string length: 3 - 10000
aspect_ratio
enum<string>
Available options:
9:16,
2:3,
3:4,
4:5,
1:1,
5:4,
4:3,
3:2,
16:9
effort
enum<string>
default:high
Available options:
high,
low
images

Response

Job accepted

data
object
required
errors
unknown