# Add images to a benchmark

`POST /v1/benchmarks/{benchmark_id}/images`

Adds up to 500 existing images to a custom benchmark. Every image
must be in your default workspace, visible, and of the benchmark's
scope; one image that is not refuses the whole request.

Images already in the benchmark are reported in
`already_member_image_ids` rather than added again, so a retry is
safe.

## Request Body

### application/json

- **object**
  - `image_ids` (array<string>, required) — Images already in your default workspace, such as an `image_id` from
[Submit an image for scoring](/api/images/scoreImage). Duplicates are
dropped.

    - items:
      - **string**

## Responses

### 200 — The updated benchmark and what was added

**application/json**

- **object**
  - `benchmark` (object, required) — A custom benchmark: a set of your own images that other images are
ranked against. Custom benchmarks live in your organization's default
workspace.

    - **object** — A custom benchmark: a set of your own images that other images are
ranked against. Custom benchmarks live in your organization's default
workspace.

      - `id` (string, required)
      - `name` (string, required)
      - `description` (any, required)
      - `scope` (enum: "hero" | "carousel", required) — The image type a custom benchmark holds and scores: `hero` or
`carousel`. It is fixed when the benchmark is created.

      - `asset_type` (any, required) — Label for a benchmark of Other carousel assets, such as `Recipe`;
`null` for a hero benchmark or a standard carousel benchmark.

      - `image_count` (integer, required) — Visible images in the benchmark.
      - `minimum_images` (integer, required) — Images needed before the benchmark can score.
      - `recommended_images` (integer, required) — Images recommended for a stable benchmark.
      - `created_at` (string, required)
      - `updated_at` (string, required)
      - `last_scoring` (any, required) — The latest scoring of the benchmark's own images; `null` before the
first one.

  - `added_image_ids` (array<string>, required) — Images this request added, in request order.
    - items:
      - **string**
  - `already_member_image_ids` (array<string>, required) — Images that were already in the benchmark, in request order.
    - items:
      - **string**

### 400 — Check `error_code`:
  - NO_DEFAULT_PORTFOLIO: your organization has no default portfolio
  - NO_DEFAULT_WORKSPACE: your default portfolio has no default workspace
  - IMAGE_NOT_VISIBLE: an image is hidden or still pending
  - BENCHMARK_SCOPE_MISMATCH: an image is not of the benchmark's scope


**application/json**

- **object** — Standardized error format for all `/v1/*` endpoints. `error_code` is a
stable SCREAMING_SNAKE_CASE identifier clients can switch on.

  - `detail` (string) — Human-readable error message
  - `status_code` (integer) — HTTP status code
  - `error_code` (string) — Stable machine-readable error code
  - `request_id` (any) — Request identifier for correlation
  - `extra` (any) — Endpoint-specific additional context. For example,
IMAGE_DOWNLOAD_FAILED populates extra.failed_urls with per-URL
failure reasons so clients can triage bulk submissions.

  - `timestamp` (string)

### 401 — Missing or invalid Bearer token

### 404 — Check `error_code`:
  - NOT_FOUND: custom benchmarks are not enabled for your organization
  - BENCHMARK_NOT_FOUND: no such custom benchmark in your default workspace
  - IMAGE_NOT_FOUND: an image is not in your default workspace


**application/json**

- **object** — Standardized error format for all `/v1/*` endpoints. `error_code` is a
stable SCREAMING_SNAKE_CASE identifier clients can switch on.

  - `detail` (string) — Human-readable error message
  - `status_code` (integer) — HTTP status code
  - `error_code` (string) — Stable machine-readable error code
  - `request_id` (any) — Request identifier for correlation
  - `extra` (any) — Endpoint-specific additional context. For example,
IMAGE_DOWNLOAD_FAILED populates extra.failed_urls with per-URL
failure reasons so clients can triage bulk submissions.

  - `timestamp` (string)

### 422 — Request validation failed (error_code VALIDATION_ERROR)

**application/json**

- **object** — Standardized error format for all `/v1/*` endpoints. `error_code` is a
stable SCREAMING_SNAKE_CASE identifier clients can switch on.

  - `detail` (string) — Human-readable error message
  - `status_code` (integer) — HTTP status code
  - `error_code` (string) — Stable machine-readable error code
  - `request_id` (any) — Request identifier for correlation
  - `extra` (any) — Endpoint-specific additional context. For example,
IMAGE_DOWNLOAD_FAILED populates extra.failed_urls with per-URL
failure reasons so clients can triage bulk submissions.

  - `timestamp` (string)

### 429 — Rate limit exceeded for this organization
