> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.reka.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.reka.ai/_mcp/server.

# Search Images

POST https://vision-agent.api.reka.ai/v1/images/search
Content-Type: application/json

Search for images with a plaintext query

Reference: https://docs.reka.ai/vision/api-reference/image-search/search-images-v-1-images-search-post

## Authentication

- `X-Api-Key` header (required) — API key authentication via X-Api-Key header
- `Authorization` header (bearer token, required) — Bearer token authentication via Authorization header

## Request

### Headers

- `X-Enable-Overwrite-Metering` (string, optional, nullable)

### Body (application/json)

This endpoint expects an ImageSearchRequest.

- `query` (string, required) — Search query text
- `max_results` (integer, optional, default: 10)
- `search_mode` (enum, optional, default: vision) — Search mode: 'vision' for vision-only search, 'joined' for hybrid search
  - Allowed values: `vision`, `joined`
- `image_weight` (double, optional, nullable) — Weight of the image in the search (only used when search_mode='joined')
- `text_weight` (double, optional, nullable) — Weight of the text in the search (only used when search_mode='joined')
- `threshold` (double, optional, nullable) — Similarity score threshold

## Response

### 200

Successful Response

- `results` (list of ImageSearchResult, required)

## Types

### ImageSearchResult

- `image_id` (string, required)
- `image_url` (string, required)
- `image_metadata` (SecurityMetadata, required)
- `upload_timestamp` (double, required)
- `score` (double, optional, nullable)

### SecurityMetadata

- `camera_id` (string, optional, nullable)
- `recorded_timestamp_utc` (integer, optional, nullable)
- `video_clip_id` (string, optional, nullable)
- `org_id` (string, optional, nullable)
- `site_id` (string, optional, nullable)
- `event_id` (string, optional, nullable)
- `caption` (string, optional, nullable)
- `detection_metadata` (list of DetectionMetadata, optional, nullable)

### DetectionMetadata

- `class_name` (string, required)
- `bounding_box` (list of integer, required)
- `confidence` (double, optional, nullable)
- `is_license_plate` (boolean, optional, default: false)
- `license_plate_number` (string, optional, nullable)
- `ncic_category` (string, optional, nullable)

## Examples

**Request**

```json
{
  "query": "string"
}
```

**Response**

```json
{
  "results": [
    {
      "image_id": "string",
      "image_url": "string",
      "image_metadata": {
        "camera_id": "string",
        "recorded_timestamp_utc": 1,
        "video_clip_id": "string",
        "org_id": "string",
        "site_id": "string",
        "event_id": "string",
        "caption": "string",
        "detection_metadata": [
          {
            "class_name": "string",
            "bounding_box": [
              1
            ],
            "confidence": 1.1,
            "is_license_plate": false,
            "license_plate_number": "string",
            "ncic_category": "string"
          }
        ]
      },
      "upload_timestamp": 1.1,
      "score": 1.1
    }
  ]
}
```

**SDK Code**

```python
import requests

url = "https://vision-agent.api.reka.ai/v1/images/search"

payload = { "query": "string" }
headers = {
    "X-Api-Key": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://vision-agent.api.reka.ai/v1/images/search';
const options = {
  method: 'POST',
  headers: {'X-Api-Key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"query":"string"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://vision-agent.api.reka.ai/v1/images/search"

	payload := strings.NewReader("{\n  \"query\": \"string\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("X-Api-Key", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://vision-agent.api.reka.ai/v1/images/search")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["X-Api-Key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"query\": \"string\"\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://vision-agent.api.reka.ai/v1/images/search")
  .header("X-Api-Key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"query\": \"string\"\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://vision-agent.api.reka.ai/v1/images/search', [
  'body' => '{
  "query": "string"
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'X-Api-Key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://vision-agent.api.reka.ai/v1/images/search");
var request = new RestRequest(Method.POST);
request.AddHeader("X-Api-Key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"query\": \"string\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "X-Api-Key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = ["query": "string"] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://vision-agent.api.reka.ai/v1/images/search")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```