---
title: "PUT /images/{asset_id}"
method: PUT
path: "/images/{asset_id}"
tags: ["Images"]
---

# PUT /images/{asset_id}

`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`

Update an image with new data.

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

## Path parameters

- `asset_id` string, required

## Query parameters

- `lang` string
- `overwrite` boolean

## Request body

- object
  - `image` ImageUpdate
    - `asset_id` string: New asset ID for this image. Must be unique across all other images. Cannot contain any of these characters: `?&#\/%<>+`
    - `alt_text` string: Updated alt text for the image.
    - `metadata` object: optional: Any custom information you want to store. This will be passed back on all API requests and webhooks.

## Response `200`

Successful update of the image.

- Image
  - `asset_id` string: The unique ID of the image.
  - `url` string: The URL of the image. Will be `null` if the image was added via raw file upload.
  - `alt_text` string: The assigned alt text of the image.
  - `alt_texts` object: Alt text in requested languages, with language codes as keys.
  - `tags` unknown[]: Words or phrases that you want to associate with the image.
    - unknown
  - `metadata` object: Any custom information you want to store. This will be passed back on all API requests and webhooks.
  - `created_at` integer: Creation date of the image, in seconds since epoch.
  - `errors` object: 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.

## Other responses

- `4XX`: Invalid request. See image errors field for details.

---

[API](https://skmtc.dev/alttext/apis/alttext-ai-api.md) · [All operations](https://skmtc.dev/alttext/apis/alttext-ai-api/llms.txt) · [OpenAPI document](https://skmtc.dev/alttext/apis/alttext-ai-api/revisions/6eb62e8e450c?raw)
