---
title: get-a-repository-image
product: vercel
url: /docs/rest-api/vcr/get-a-repository-image
canonical_url: "https://vercel.com/docs/rest-api/vcr/get-a-repository-image"
last_updated: 2026-09-01
type: reference
prerequisites:
  []
related:
  - /docs/rest-api
summary: Learn about get-a-repository-image on Vercel.
install_vercel_plugin: npx plugins add vercel/vercel-plugin
---

# Get a repository image

```http
GET /v1/vcr/repository/{idOrName}/images/{imageIdOrDigest}
```

Fetch an individual image from a repository, including its tags and Dockerfile history entries with discriminated layer details for UI rendering. The image may be addressed by its internal id (`image_...`) or by its manifest digest (`sha256:...`).

## Authentication

**bearerToken**: HTTP bearer

## Path parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `idOrName` | string. maxLength: 255 | Yes |  |
| `imageIdOrDigest` | string. maxLength: 255 | Yes | The internal image id (`image_...`) or the image manifest digest (`sha256:...`). |


## Query parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `projectId` | string | Yes |  |
| `teamId` | string | No | The Team identifier to perform the request on behalf of. |
| `slug` | string | No | The Team slug to perform the request on behalf of. |


## Example request

### TypeScript

```typescript
const response = await fetch('https://api.vercel.com/v1/vcr/repository/idOrName/images/imageIdOrDigest?projectId=string&teamId=string&slug=string', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
console.log(data);
```

### Next.js

```typescript
'use server';

export async function callEndpoint() {
  const response = await fetch('https://api.vercel.com/v1/vcr/repository/idOrName/images/imageIdOrDigest?projectId=string&teamId=string&slug=string', {
    method: 'GET',
    headers: {
      'Authorization': `Bearer ${process.env.VERCEL_ACCESS_TOKEN}`,
      'Content-Type': 'application/json',
    },
    next: { revalidate: 3600 }
  });

  if (!response.ok) {
    throw new Error('Request failed');
  }

  return response.json();
}
```

### cURL

```bash
curl -X GET 'https://api.vercel.com/v1/vcr/repository/idOrName/images/imageIdOrDigest?projectId=string&teamId=string&slug=string' \
  -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  -H 'Content-Type: application/json'
```

## Example response

```json
{
  "image": {
    "layers": [
      {
        "createdBy": "string",
        "digest": "string",
        "operation": "ADD",
        "sizeBytes": "123",
        "type": "FROM",
        "baseImage": "string",
        "collapsedDigests": [],
        "collapsedLayerCount": "123"
      }
    ],
    "tags": [],
    "id": "img_a1b2c3d4e5f6",
    "repositoryId": "repo_a1b2c3d4e5f6",
    "manifestDigest": "sha256:2c4e8f3a1b9d0e5c7a6f4b2d8e1c9a0b3d5f7e9c1a2b4d6f8e0c2a4b6d8f0e2c",
    "kind": "attestation",
    "platform": "linux",
    "arch": "amd64",
    "pushedBy": "string",
    "sizeInBytes": "123",
    "status": "preparing",
    "createdAt": "2026-06-30T10:00:00.000Z"
  }
}
```

## Responses

### 200: No description

Content-Type: `application/json`

```json
{
  "type": "object",
  "required": [
    "image"
  ],
  "properties": {
    "image": {
      "type": "object",
      "description": "A single image with its tags, status and resolved Dockerfile layer history.",
      "required": [
        "createdAt",
        "id",
        "kind",
        "layers",
        "manifestDigest",
        "repositoryId",
        "sizeInBytes",
        "status",
        "tags"
      ],
      "properties": {
        "layers": {
          "type": "array",
          "items": {}
        },
        "tags": {
          "type": "array",
          "description": "Tags pointing at this image's manifest.",
          "items": {
            "type": "string"
          }
        },
        "id": {
          "type": "string",
          "description": "Internal identifier of the image."
        },
        "repositoryId": {
          "type": "string",
          "description": "Identifier of the repository the image belongs to."
        },
        "manifestDigest": {
          "type": "string",
          "description": "SHA-256 digest of the image manifest."
        },
        "kind": {
          "type": "string",
          "description": "Whether the manifest is a multi-platform image index, a single-platform image manifest or an attestation.",
          "enum": [
            "attestation",
            "index",
            "manifest"
          ]
        },
        "platform": {
          "type": "string",
          "description": "Operating system the manifest targets. Only present for single-platform manifests."
        },
        "arch": {
          "type": "string",
          "description": "CPU architecture the manifest targets. Only present for single-platform manifests."
        },
        "pushedBy": {
          "type": "string",
          "description": "Identifier of the actor that pushed the image."
        },
        "sizeInBytes": {
          "type": "number",
          "description": "Total size in bytes of the image's resources (manifest, config and layer blobs) stored by the registry."
        },
        "status": {
          "type": "string",
          "description": "VHS-readiness status, or `null` for a multi-platform index.",
          "enum": [
            "preparing",
            "ready",
            "unoptimized",
            null
          ],
          "nullable": true
        },
        "createdAt": {
          "type": "string",
          "description": "ISO 8601 timestamp of when the image was created."
        }
      }
    }
  }
}
```

### 400: One of the provided values in the request query is invalid.

### 401: The request is not authorized.

### 403: You do not have permission to access this resource.

### 404: No description

### 410: No description

---

## Related

- [vcr endpoints](/docs/rest-api#vcr)

- [REST API overview](/docs/rest-api)

- [OpenAPI spec](https://openapi.vercel.sh/) (machine-readable, all endpoints)

---

[View full sitemap](/docs/sitemap)
