POST /image/alt or mynth.image.alt() to generate concise alt text for a single existing image URL. The API creates an async task and returns a taskId. The SDK waits for completion by default; use altAsync() when you want to poll yourself.
This endpoint is for images you already have (including ones not generated by Mynth). For content classification of existing images, use Rate Image Content (POST /image/rate).
Pricing
/image/alt costs $0.0004 per image. You are charged only when the task completes successfully.
The cost is reserved up front. If the task fails, the reserve is released. If your balance cannot cover the reserve, the request returns 422 INSUFFICIENT_BALANCE.
Generate alt text with the SDK
Local files
Passfile instead of url when the image is local. The SDK uploads first, then calls /image/alt with the resulting URL. See Upload input images.
Task failures
If alt text cannot be generated, the task status isfailed. The SDK’s wait() throws TaskAsyncTaskFailedError.
Constraints
Alt text describes visible content only. The model is prompted for concise, objective labels (typically under ~100 characters); the API allows up to 160.
Generate alt text with REST
201):
/tasks/:id for the completed result. Full fields live in Image Alt Request.
Start now, wait later
UsealtAsync() when you want to create the task now and wait later:
/tasks/:id/status and /tasks/:id, or listen for task.image.alt.completed / task.image.alt.failed webhooks.
See Async and polling and Use webhooks.
How alt text fits
- You submit one image URL (or upload a file via the SDK).
- Mynth fetches the image and generates short alt text with a vision model.
- On success the result is
{ url, alt }. On failure the task isfailed. - Billing charges only successful tasks; reserved balance for failures is released.