> This page is for API Reference.

> Sarvam Voice Agents (Samvaad) is a voice AI agent platform for Indian languages: build, test and deploy AI calling agents on your own phone numbers, from ₹3 a minute. Start here: https://docs.sarvam.ai/voice-agents/why-voice-agents.
> For clean Markdown of any page, append `.md` to the page URL.
> For a complete documentation index, see https://docs.sarvam.ai/llms.txt. For a section index, append `/llms.txt` to any section URL (for example https://docs.sarvam.ai/voice-agents/llms.txt).
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.sarvam.ai/_mcp/server.

# Get Capabilities

GET https://api.sarvam.ai/doc-ai/v1/capabilities

Returns the Classify and Split features, input formats, limits and options enabled on this deployment. Check it before using options such as `reasoning_input` image modes or photo triggers.

Reference: https://docs.sarvam.ai/api-reference/doc-ai/capabilities

## Authentication

- `api-subscription-key` header (required) — API Key authentication via header

## Response

### 200

OK

- `api_contract` (string, optional) — Contract version, `v1`.
- `operations` (list of string, optional) — Enabled operations, e.g. `split` and `classify`.
- `input_formats` (list of string, optional) — Accepted media types.
- `inspection_policies` (list of string, optional) — Classify inspection policies.
- `reasoning_input_modes` (list of string, optional) — Enabled `reasoning_input` values, e.g. `auto` and `text_only`.
- `split_methods` (list of string, optional)
- `features` (map from string to boolean, optional) — Feature flags, e.g. `split_triggers` and `split_trigger_photo`.
- `limits` (DocAICapabilityLimits, optional)
- `retention_seconds` (integer, optional) — How long jobs and results are kept.
- `review_timeout_hours_max` (integer, optional)

## Errors

### 401 Unauthorized Error

Missing or invalid API key

- `code` (string, required) — Machine-readable error code, e.g. `INVALID_REQUEST`, `UNAUTHORIZED`, `NOT_FOUND`, `RESULTS_NOT_READY`, `IDEMPOTENCY_CONFLICT`, `PAGE_RANGE_INVALID`, `UNSUPPORTED_CAPABILITY`, `UNSUPPORTED_INPUT` or `TOO_MANY_DOCUMENTS`.
- `message` (string, required) — Human-readable summary.
- `retryable` (boolean, required) — Whether retrying the same request can succeed.
- `detail` (string, optional) — Explanation specific to this occurrence.
- `pointer` (string, optional) — JSON pointer to the offending field, e.g. `/config/scope`.
- `request_id` (string, optional) — Request identifier to quote when reporting an issue.
- `status` (integer, optional) — HTTP status code.
- `title` (string, optional) — Short title of the HTTP status.
- `job_status` (string, optional) — Present on `RESULTS_NOT_READY`, the current status of the job.

## Types

### DocAICapabilityLimits

- `max_source_pages` (integer, optional) — Maximum pages in one source document.
- `max_source_bytes` (integer, optional) — Maximum size of one source document in bytes.
- `max_categories` (integer, optional) — Maximum categories in one request.
- `max_segments` (integer, optional) — Maximum segments a Split can return.
- `max_inline_result_bytes` (integer, optional) — Largest result returned inline.

## Examples

**Response**

```json
{
  "api_contract": "string",
  "operations": [
    "string"
  ],
  "input_formats": [
    "string"
  ],
  "inspection_policies": [
    "string"
  ],
  "reasoning_input_modes": [
    "string"
  ],
  "split_methods": [
    "string"
  ],
  "features": {},
  "limits": {
    "max_source_pages": 1,
    "max_source_bytes": 1,
    "max_categories": 1,
    "max_segments": 1,
    "max_inline_result_bytes": 1
  },
  "retention_seconds": 1,
  "review_timeout_hours_max": 1
}
```

**SDK Code**

```python
import requests

url = "https://api.sarvam.ai/doc-ai/v1/capabilities"

headers = {"api-subscription-key": "<apiSubscriptionKey>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.sarvam.ai/doc-ai/v1/capabilities';
const options = {method: 'GET', headers: {'api-subscription-key': '<apiSubscriptionKey>'}};

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"
	"net/http"
	"io"
)

func main() {

	url := "https://api.sarvam.ai/doc-ai/v1/capabilities"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("api-subscription-key", "<apiSubscriptionKey>")

	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://api.sarvam.ai/doc-ai/v1/capabilities")

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

request = Net::HTTP::Get.new(url)
request["api-subscription-key"] = '<apiSubscriptionKey>'

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.get("https://api.sarvam.ai/doc-ai/v1/capabilities")
  .header("api-subscription-key", "<apiSubscriptionKey>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.sarvam.ai/doc-ai/v1/capabilities', [
  'headers' => [
    'api-subscription-key' => '<apiSubscriptionKey>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.sarvam.ai/doc-ai/v1/capabilities");
var request = new RestRequest(Method.GET);
request.AddHeader("api-subscription-key", "<apiSubscriptionKey>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["api-subscription-key": "<apiSubscriptionKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.sarvam.ai/doc-ai/v1/capabilities")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

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()
```