Overview
Prompt Optimizer is an asynchronous text utility API. Submit a raw prompt, choose an optimization style and target media type, then poll the task for the optimized prompt output.Endpoint and authentication
Base URL:
All requests require your APIXO API key:
Copy-paste async quickstart
taskId; you need it to poll for the final result.
Poll for result
resultJson after state becomes success:
Request body
Parameters
string
default:"async"
required
Result delivery mode. Use
async for polling with statusTask, or callback for webhook delivery.string
Required when
request_type is callback. Must be a callback URL that can receive the final task payload. See Webhooks.object
required
Prompt Optimizer input parameters.
Response format
Submit task response
POST /generateTask/prompt-optimizer returns a task ID when the task is accepted:
integer
API status code.
200 means the task was accepted.string
Human-readable status message.
string
Unique task identifier used with the status endpoint.
Status response fields
string
Unique task identifier.
string
Current task state:
pending, processing, success, or failed.string
JSON string containing optimized prompt output. Present when
state is success.string
Machine-readable failure code. Present when
state is failed.string
Human-readable failure message. Present when
state is failed.integer
Task creation timestamp in Unix milliseconds.
integer
Task completion timestamp in Unix milliseconds. Present after completion.
integer
Processing duration in milliseconds when available.
Webhook callback mode
Use callback mode when your backend should receive the final result automatically instead of polling.Billing
Prompt Optimizer is billed per call.
For current route and market comparison pricing, see Pricing.
Latency and polling
Prompt Optimizer tasks are asynchronous. Actual latency varies by prompt length and queue load.Errors and troubleshooting
HTTP errors
Request validation
See Error Codes for the full error reference.