API endpoints

Prompt Polish API

POST /open/v1/prompts/polish expands a short description into a detailed image or video prompt, billed like web AI polish; returns the result, cost and balance.

On this page

Polish a prompt

http
POST /open/v1/prompts/polish

Works the same as "AI polish" in the web app: it expands a simple idea into a complete prompt covering subject, setting, lighting, composition and style. This endpoint is synchronous and returns the polished result directly, with no polling needed.

curl https://api.zroimg.com/open/v1/prompts/polish \
  -H "Authorization: Bearer zk-xxxxxxxxxxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{"prompt": "a cat on a windowsill", "scene": "image"}'

Request parameters

ParameterTypeRequiredDescription
promptstringYesOriginal description to polish
scenestringNoimage (default) or video; polishes in the style of an image or video prompt
image_urlsstring[]NoReference image HTTPS URLs, up to 4 (PNG / JPEG / WebP). The result stays grounded in the images: it keeps the subject, setting, palette, lighting and style they show and treats prompt as the requested change or action; for video it describes motion and camera work starting from the image

Response

json
{
  "prompt": "A fluffy ginger cat curled up on a sunlit wooden windowsill, soft morning light, shallow depth of field, warm tones, cozy atmosphere",
  "cost_points": 1,
  "balance": 275
}
FieldTypeDescription
promptstringPolished prompt
cost_pointsintegerCredits charged for this request
balanceintegerCredit balance after the charge

Billing and limits

  • Each polish is charged separately at the same price as in the web app; credits are refunded automatically if polishing fails.
  • Counts toward the submit endpoint limit (20 requests / minute per key).
  • Returns 400 invalid_request when the platform has not enabled the polish service; an upstream service failure returns 502 upstream_error, and credits are refunded.
  • If image_urls is provided but the platform's polish model cannot read images, returns 502 upstream_error and the credits are refunded.

The polished result can be used directly as the prompt for image generation or video generation.