> ## Documentation Index
> Fetch the complete documentation index at: https://docs.genviral.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Add Pack Image

> Add one image URL reference to a pack

Adds one image URL to a pack you can mutate.

## Behavior

* Stores the provided `image_url` and inferred file metadata on the pack.
* Queues AI image metadata enrichment (`description`, `keywords`) for async processing.
* Does not download, fetch, or re-host the remote file during this call.
* If you only have local file bytes, use [Upload File](/api-reference/upload-file) first and then pass the returned `url` as `image_url`.

<Warning>
  `image_url` should still be reachable when slideshow generation/render runs.
  Temporary or private URLs can fail later.
</Warning>

## Path Parameters

<ParamField path="packId" type="string" required>
  Pack UUID.
</ParamField>

## Body Parameters

<ParamField body="image_url" type="string" required>
  Absolute image URL.
</ParamField>

<ParamField body="file_name" type="string">
  Optional display filename (`1-255` chars). Default: `"image"`.
</ParamField>

<Note>
  The API infers `content_type` from URL extension (`.png`, `.gif`, `.webp`,
  `.heic`, `.heif`, `.avif`) and defaults to `image/jpeg` when unknown.
</Note>

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url https://www.genviral.io/api/partner/v1/packs/11111111-1111-1111-1111-111111111111/images \
    --header 'Authorization: Bearer <token>' \
    --header 'Content-Type: application/json' \
    --data '{
    "image_url": "https://cdn.example.com/packs/motivation/03.jpg",
    "file_name": "03.jpg"
  }'
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "ok": true,
    "code": 201,
    "message": "Pack image added",
    "data": {
      "id": "44444444-4444-4444-4444-444444444444",
      "url": "https://cdn.example.com/packs/motivation/03.jpg",
      "file_name": "03.jpg",
      "content_type": "image/jpeg",
      "metadata": {
        "status": "pending",
        "description": null,
        "keywords": [],
        "model": "gpt-4.1-nano",
        "generated_at": null,
        "error": null
      }
    }
  }
  ```
</ResponseExample>

## Error Responses

* `400 missing_pack_id` - path param missing
* `400 invalid_json` - body is not valid JSON
* `422 invalid_payload` - schema validation failed
* `404 not_found` - pack is missing/outside mutable key scope
* `401` - authentication failed (missing/invalid/revoked token)
* `402 subscription_required` - active Creator/Professional/Business plan required
* `403 tier_not_allowed` - Scheduler tier cannot use Partner API
* `500 pack_image_add_failed` - unexpected insertion failure
