> For the complete documentation index, see [llms.txt](https://devhub.autograb.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://devhub.autograb.com/vehicle-data/stock-photos.md).

# Stock Photos

## Get stock photos from a Vehicle ID

> Get stock photos from a Vehicle ID

```json
{"openapi":"3.1.1","info":{"title":"AutoGrab API","version":"2.0.0"},"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"ApiKey"}},"schemas":{"ErrorSchema":{"type":"object","properties":{"error":{"type":"boolean","default":true},"message":{"type":"string","description":"Error message"}}}}},"paths":{"/v2/vehicles/{vehicle_id}/photos":{"get":{"summary":"Get stock photos from a Vehicle ID","description":"Get stock photos from a Vehicle ID","parameters":[{"schema":{"type":"string"},"name":"vehicle_id","required":true,"description":"ID of the vehicle that you want to view stock photos of","in":"path"},{"schema":{"type":"string"},"name":"color","description":"The color of the vehicle that you want to return. Defaults to white if not specified or if there are no photos available for the color you requested","in":"query"},{"schema":{"type":"enum","enum":["au","nz","uk","my","de","fr","be","it","lu","nl","es"]},"name":"region","description":"The region to perform this request in","in":"query"},{"schema":{"type":"string"},"name":"reference_id","required":false,"description":"An optional reference id which will be stored against usage records if supplied","in":"query"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","default":true},"images":{"type":"array","items":{"type":"object","properties":{"type":{"description":"The type of photo (either \"stock\" or \"generated\")","type":"enum","enum":["stock","generated"]},"color":{"description":"The color of the vehicle in the photo, if known","type":["string","null"]},"url":{"description":"The image URL","type":"string"},"match_confidence":{"description":"The confidence level that the stock image represents the same vehicle as the ID in the request","type":"enum","enum":["high","medium","low"]}}}}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}}},"tags":["Vehicles"]}}}}
```

### Example usage

For photos you already have the AGID For (from [facets](/vehicle-search/facet-search.md), [VIN](/vehicle-search/vin-search.md) or [Rego](/vehicle-search/registration-plate-search.md) search in your context) you can now send that ID to the photos service to resolve to the most relevant image.&#x20;

```json
curl --location 'https://api.autograb.com.au/v2/vehicles/5674527417696256/photos?region=au' \
--header 'ApiKey: YOURKEY'
```

You can also specify the colour you're after with `"&color=Black"` or the like.

```json
curl --location 'https://api.autograb.com.au/v2/vehicles/5674527417696256/photos?region=au&color=Black' \
--header 'ApiKey: YOURKEY'
```

**Colour**

A colour value is always returned, regardless of whether one is requested. If no colour is specified in the request, white is returned by default. Where white is unavailable, the next available colour is returned.

**Match Confidence**

Match confidence reflects the accuracy of the mapping between the supplied AutoGrab ID and the descriptors present on the image. This value is not always high.

A medium confidence score typically indicates variation in attributes such as drive type or fuel type — factors that do not necessarily affect the vehicle's visual presentation. A low confidence score suggests the mapping between the supplied ID and the vehicle is likely inaccurate.

```json
        {
            "type": "generated",
            "color": "White",
            "url": "https://storage.googleapis.com/ag-vehicle-stock-images/9981807149433772/generic-hero-white-354313d0-5041-49e5-a024-5781852d6e9d.png",
            "match_confidence": "medium"
        },
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://devhub.autograb.com/vehicle-data/stock-photos.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
