MuseSpark
MuseSpark
Models & toolsTools

Image Alt Text Generator API guide

Image Alt Text Generator API: Generate a textual description of an image. Use focus to direct attention and detail_level to choose the level of description.

Model overview

Generate a textual description of an image. Use focus to direct attention and detail_level to choose the level of description.

API integration

DocumentationValue
API invocation identifierimage-captioner
IntegrationAsync task API

Use this invocation identifier in API requests. Check your authorized model catalog for access. Follow the Quickstart for your first complete call.

Request parameters

Studio presets describe the form setup, not guaranteed server defaults. Send preset values explicitly to reproduce them.

imagestringNon-nullOptional

Image to caption

Media types: image/*.

focusstringNon-nullOptional

Specific area or subject to focus on in the caption (optional).

detail_levelstringNon-nullOptional

Level of detail for the caption.

Allowed values: "low", "medium", "high".

Studio preset: "medium".

No parameters match. Clear the search or reset the filters.

Model rules

  • Include image in a usable captioning request even though the current exported field is marked optional. focus and detail_level are public request controls.

Integration notes

Use the following field formats and values in MuseSpark requests.

  • image: The image field is currently optional in the exported schema. Provide it explicitly for captioning.

Request examples

Replace example media URLs and YOUR_... input identifiers with your own valid resources. Examples are checked against the exported item schema; media access and paid execution are separate runtime checks.

Set MUSESPARK_API_KEY and a stable MUSESPARK_REQUEST_ID before submitting. Preserve the request ID for retries of the same request and use a new ID for new work. Python examples use requests; JavaScript examples use Node.js 20 or later. The standalone Quickstart includes task polling and recovery.

Describe a product image

curl --fail-with-body 'https://api.musespark.ai/api/v1/openapi/task' \
  -H "Authorization: Bearer $MUSESPARK_API_KEY" \
  -H "X-Idempotency-Key: $MUSESPARK_REQUEST_ID" \
  -H 'Content-Type: application/json' \
  -d '{
  "item_key": "image-captioner",
  "parameters": {
    "detail_level": "high",
    "image": "https://example.com/ceramic-mug-on-desk.jpg",
    "focus": "The ceramic mug in the foreground"
  }
}'

Parameters used: detail_level · image · focus.

Output

The intended model output is descriptive text about the supplied image.

The model’s intended result is a text description of the image’s content.

Creation returns a task ID inside data. Poll that task until completion, then save data.result.output_urls and any data.result.batch_results. See the task lifecycle for terminal states, result retention, and errors.

Troubleshooting

A request has no image to describe. Supply an accessible image URL explicitly; the current examples include it.

image

The caption covers the wrong part of the scene. Set focus to the subject or region you want described, such as the foreground product.

focus · image

For rejected inputs, check the field type, accepted values, and conditional requirements in Request parameters and Model rules. Correct the affected fields before submitting again.

If creation times out, preserve the request identity and any known task ID. Follow Errors, timeouts and retries before submitting again.

The public input snapshot was exported on 2026-11-09. Current prices and availability are listed in the model center.