> This page is for Workforce.

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

# List public models or fetch a single model

GET https://api-gateway.merge.dev/v1/models

List all available public models. Supports filtering by provider or vendor, or fetching a single model by query parameter with ?model=\<provider/model-name>. Results are paginated: a page holds at most 500 models, and larger catalogs are read by following next\_cursor until has\_more is false.

Reference: https://docs.merge.dev/merge-workforce/ai-gateway/models/list

## Authentication

- `Authorization` header (bearer token, required) — Your production key sent as a bearer token.

## Request

### Query parameters

- `model` (string, optional) — Fetch a single model by ID in format 'provider/model-name'
- `provider` (string, optional) — Filter by provider
- `vendor` (string, optional) — Filter by vendor
- `zero_data_retention` (boolean, optional) — When true, list only models with at least one ZDR vendor; when false, only models with at least one non-ZDR vendor.
- `cursor` (string, optional) — Pagination cursor. Pass the next_cursor returned by the previous page to fetch the models that follow it. Omit on the first request.
- `limit` (integer, optional, default: 50) — Models per page. Defaults to 50, minimum 1, maximum 500. A limit above 500 is rejected with 422; page through the rest with next_cursor rather than raising it.

## Response

### 200

Successful Response

- `Models_list_Response_200`
  - PublicModelsListResponse: PublicModelsListResponse
  - PublicModel: PublicModel

## Errors

### 422 Unprocessable Entity Error

Validation Error

- `detail` (list of ValidationError, optional)

## Types

### PublicModelsListResponse

Paginated response wrapper for `GET /v1/models`. Use the `next_cursor` field to page through results when `has_more` is true.

- `data` (list of PublicModel, required)
- `object` ("list", optional, default: list)
- `has_more` (boolean, optional, default: false) — True when more models remain beyond this page. Keep paging while this is true.
- `next_cursor` (string, optional, nullable) — Cursor to pass as ?cursor= to fetch the next page. Null on the last page.

### PublicModel

A canonical model in Merge Gateway's catalog. Identified by `model` (fully-qualified provider/model ID) and exposes the set of `vendors` that can execute it, each with its own capabilities, context window, pricing, and ZDR flag.

- `model` (string, required) — Model ID in format 'provider/model-name'
- `provider` (string, required)
- `display_name` (string, required)
- `vendors` (map from string to PublicVendorModelInfo, required)
- `availability_status` (enum, required)
  - Allowed values: `available`, `deprecated`
- `created_at` (datetime, optional, nullable)
- `updated_at` (datetime, optional, nullable)
- `aliases` (list of PublicModelAlias, optional) — Aliases that resolve to this model.
- `access_required` (boolean, optional, default: false) — True when the model is listed but calls to it return 403 until access is granted.
- `access_reason` (string, optional, nullable) — Machine-readable reason access is required, matching the error `code` the model endpoints return; null otherwise.
- `source` (enum, optional) — Set to `self_hosted` on models served by an endpoint your organization registered; absent for catalog models.
  - Allowed values: `self_hosted`

### ValidationError

Single field-level validation error. `loc` is the JSON path to the offending field, `msg` is a human-readable explanation, and `type` is a stable machine-readable error code.

- `loc` (list of ValidationErrorLocItems, required)
- `msg` (string, required)
- `type` (string, required)
- `input` (any, optional)
- `ctx` (ValidationErrorCtx, optional)

### PublicVendorModelInfo

Per-vendor execution metadata for a model, including context window, max output tokens, capabilities, pricing, and availability. A single `PublicModel` carries one of these for each vendor that can execute it.

- `context_window` (integer, required)
- `max_output_tokens` (integer, required)
- `availability_status` (enum, required)
  - Allowed values: `available`, `deprecated`
- `capabilities` (PublicVendorModelCapabilities, required) — Per-route capability flags. Lists supported input/output content types (text, image, document, tool_use) and feature support (tool calling, tool choice, structured outputs, streaming).
- `pricing` (ModelPricing, required) — Pricing information for a model.
- `launch_date` (string, optional, nullable)
- `service_tiers` (list of string, optional, default: ["standard"]) — Service tiers this route supports (always includes 'standard'). Presence of 'flex' means the route is priced for flex.
- `zero_data_retention` (boolean, optional, default: false) — Whether this vendor route supports zero data retention.
- `batch_endpoints` (list of string, optional, nullable) — Batch `endpoint` values this route runs, set only on batch-capable routes.

### PublicModelAlias

An alias that resolves to this model.

- `model` (string, required) — Alias model ID.
- `type` (string, required) — Alias type.
- `display_name` (string, optional, nullable)
- `description` (string, optional, nullable)

### ValidationErrorLocItems

- string
- integer

### ValidationErrorCtx

### PublicVendorModelCapabilities

Per-route capability flags. Lists supported input/output content types (text, image, document, tool_use) and feature support (tool calling, tool choice, structured outputs, streaming).

- `input` (list of enum, required)
  - Allowed values: `text`, `image`, `document`, `audio`, `video`, `embedding`
- `output` (list of enum, required)
  - Allowed values: `text`, `tool_use`, `embedding`, `image`, `audio`, `video`, `decision`
- `supports_tool_calling` (boolean, required)
- `supports_structured_outputs` (boolean, required)
- `streaming` (boolean, required)
- `supports_tool_choice` (boolean, optional, default: false)
- `supports_reasoning` (boolean, optional, default: false) — Whether the route supports reasoning.
- `reasoning` (PublicReasoningCapabilities, optional, nullable) — Reasoning controls the route supports, when it supports reasoning.

### ModelPricing

Pricing information for a model.

- `input_per_million` (double, required)
- `output_per_million` (double, required)
- `currency` ("USD", optional, default: USD)
- `flex` (TierPricing, optional, nullable) — Per-token pricing for the flex tier on this route, or null if the route does not offer it.
- `priority` (TierPricing, optional, nullable) — Per-token pricing for the priority tier on this route, or null if the route does not offer it.
- `ultrafast` (TierPricing, optional, nullable) — Per-token pricing for OpenAI's ultrafast tier on this route, or null if the route does not offer it.
- `unit` (enum, optional, default: per_token) — How the route bills: `per_token`, `per_second`, `per_image`, or `per_character`.
  - Allowed values: `per_token`, `per_second`, `per_image`, `per_character`
- `input_per_second` (double, optional, nullable) — USD per second of input, for duration-billed routes such as transcription.
- `output_per_second` (double, optional, nullable) — USD per second of generated output, for duration-billed routes such as video.
- `output_per_image` (double, optional, nullable) — USD per generated image, for flat-priced image routes.
- `input_per_character` (double, optional, nullable) — USD per input character, for text-to-speech routes.
- `output_per_audio_second` (double, optional, nullable) — Added USD per second of generated audio, for speech vendors that price by length.
- `input_image_per_million` (double, optional, nullable) — USD per million image-input tokens on image routes that accept reference images; null means the text input rate applies.
- `output_per_second_by_resolution` (map from string to double, optional, nullable) — Per-second rates keyed by output resolution; the flat rate is the default-resolution rate.
- `output_per_image_by_resolution` (map from string to double, optional, nullable) — Per-image rates keyed by output resolution; the flat rate is the default-resolution rate.
- `cache_read_per_million` (double, optional, nullable) — USD per million cached input tokens read.
- `cache_write_per_million` (double, optional, nullable) — USD per million input tokens written to the prompt cache.
- `batch` (TierPricing, optional, nullable) — Batch pricing, present only on routes that run `POST /v1/batches` jobs.
- `schedule` (list of SchedulePeriodPricing, optional, nullable) — Time-of-day rate windows; the flat rates apply outside every window.
- `long_context` (LongContextPricing, optional, nullable) — Rates that replace the base ones for the whole request once input passes a token threshold.

### PublicReasoningCapabilities

Reasoning controls a route supports.

- `configurable` (boolean, optional, default: false) — Whether reasoning can be configured on this route.
- `disable_supported` (boolean, optional, default: false) — Whether reasoning can be turned off.
- `default_enabled` (boolean, optional, default: false) — Whether reasoning is on by default.
- `controls` (list of string, optional) — Request controls the route accepts for reasoning.
- `effort_values` (list of string, optional) — Accepted reasoning effort values.
- `output_style` (string, optional, nullable) — How the route returns reasoning, when known.

### TierPricing

Per-token pricing for a single service tier.

- `input_per_million` (double, required)
- `output_per_million` (double, required)

### SchedulePeriodPricing

Rates that replace the base ones inside a daily window; a null rate keeps the base rate.

- `name` (string, required) — Window name.
- `windows` (list of map from string to string, required) — Half-open `[start, end)` windows; a window whose end is at or before its start wraps midnight.
- `timezone` (string, optional, default: UTC) — Timezone the windows are expressed in.
- `days` (list of string, optional, nullable) — Days the windows apply on.
- `input_per_million` (double, optional, nullable)
- `output_per_million` (double, optional, nullable)
- `cache_read_per_million` (double, optional, nullable)
- `cache_write_per_million` (double, optional, nullable)

### LongContextPricing

Rates for the whole request once its input exceeds `threshold_tokens`; a null rate keeps the base rate.

- `threshold_tokens` (integer, required) — Input token count above which these rates apply.
- `input_per_million` (double, optional, nullable)
- `output_per_million` (double, optional, nullable)
- `cache_read_per_million` (double, optional, nullable)
- `cache_write_per_million` (double, optional, nullable)

## Examples

**Response**

```json
{
  "data": [
    {
      "availability_status": "available",
      "created_at": "2026-02-05T00:00:00Z",
      "display_name": "Claude Opus 4.6",
      "model": "anthropic/claude-opus-4-6",
      "provider": "anthropic",
      "updated_at": "2026-03-01T00:00:00Z",
      "vendors": {
        "anthropic": {
          "availability_status": "available",
          "capabilities": {
            "input": [
              "text",
              "image",
              "document"
            ],
            "output": [
              "text",
              "tool_use"
            ],
            "streaming": true,
            "supports_structured_outputs": true,
            "supports_tool_calling": true,
            "supports_tool_choice": true
          },
          "context_window": 1000000,
          "launch_date": "2026-02-05",
          "max_output_tokens": 128000,
          "pricing": {
            "currency": "USD",
            "input_per_million": 5,
            "output_per_million": 25
          }
        },
        "bedrock": {
          "availability_status": "available",
          "capabilities": {
            "input": [
              "text",
              "image",
              "document"
            ],
            "output": [
              "text",
              "tool_use"
            ],
            "streaming": true,
            "supports_structured_outputs": true,
            "supports_tool_calling": true,
            "supports_tool_choice": false
          },
          "context_window": 1000000,
          "launch_date": "2026-02-05",
          "max_output_tokens": 128000,
          "pricing": {
            "currency": "USD",
            "input_per_million": 5,
            "output_per_million": 25
          }
        }
      }
    }
  ],
  "has_more": false,
  "next_cursor": null,
  "object": "list"
}
```

**SDK Code**

```python
import requests

url = "https://api-gateway.merge.dev/v1/models"

headers = {"Authorization": "Bearer <token>"}

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

print(response.json())
```

```javascript
const url = 'https://api-gateway.merge.dev/v1/models';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

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-gateway.merge.dev/v1/models"

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

	req.Header.Add("Authorization", "Bearer <token>")

	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-gateway.merge.dev/v1/models")

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

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

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-gateway.merge.dev/v1/models")
  .header("Authorization", "Bearer <token>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api-gateway.merge.dev/v1/models', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api-gateway.merge.dev/v1/models");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api-gateway.merge.dev/v1/models")! 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()
```