Images

Update an image with new data.

Note: You cannot update the URL of an exist image.

put/images/{asset_id}

Request

  • Base URL: https://alttext.ai/api/v1
  • URL: https://alttext.ai/api/v1/images/{asset_id}
  • Auth: API key in header X-API-Key

Path parameters

asset_idstring required

The asset ID of the image to update.

Query parameters

langstring

The language(s) for the updated alt text. Use one of our <ins>supported language codes</ins> for this parameter.

You can request multiple languages by providing a comma-separated string (e.g. "en,fr,es").

Multi-language behavior: When updating alt text for multiple languages with overwrite: false (default when left blank), only missing languages will be updated. Existing alt text in previously generated languages will be preserved.

overwriteboolean

When false (default), existing alt text in the specified language(s) will be preserved. When true, existing alt text will be overwritten with the new value.

Request body

Response

Successful update of the image.

asset_idstring

The unique ID of the image.

urlstring

The URL of the image. Will be null if the image was added via raw file upload.

alt_textstring

The assigned alt text of the image.

alt_textsobject

Alt text in requested languages, with language codes as keys.

metadataobject

Any custom information you want to store. This will be passed back on all API requests and webhooks.

created_atinteger

Creation date of the image, in seconds since epoch.

errorsobject

Any errors associated with this image. Note - This will be an empty object for valid images.

error_code'insufficient_credits' | 'invalid_params' | 'general'

An identifier describing the type of error, if any.

Changes

No recorded changes to this operation across all 1 revision of this API.