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

# List available text models

GET https://api.beatapi.io/v1/models

Returns the text models currently enabled for this BeatAPI environment in OpenAI list format.

Reference: https://docs.beatapi.io/api-reference/claude/text/list-text-models

## Authentication

- `Authorization` header (bearer token, required) — Send your API key as `Authorization: Bearer <BEATAPI_API_KEY>`.
- `x-api-key` header (required) — Anthropic-compatible API key header. Use a BeatAPI API key.
- `x-goog-api-key` header (required) — Gemini-compatible API key header. Use a BeatAPI API key.

## Response

### 200

OpenAI-compatible model list

- `object` ("list", required)
- `data` (list of TextModel, required)

## Errors

### 401 Unauthorized Error

No API key (`missing_api_key`), or a key that is wrong, expired, disabled or exhausted (`invalid_api_key`).

- `TextError`

### 404 Not Found Error

Text API is not enabled for this environment (`not_found`).

- `TextError`

### 429 Too Many Requests Error

Too many requests (`rate_limit_exceeded`, including the free-model limits). Retry after `Retry-After` seconds.

- `TextError`

### 503 Service Unavailable Error

The request could not be completed (`processing_unavailable`, `processing_timeout` or `processing_failed`). Nothing was charged. Retry with backoff.

- `TextError`

## Types

### TextModel

- `id` (string, required) — Public text model id exposed by BeatAPI. Call GET /v1/models to discover the models enabled for your environment.
- `object` ("model", required)
- `created` (integer, required)
- `owned_by` ("beatapi", required)

### OpenAITextError

- `error` (OpenAiTextErrorError, required)

### AnthropicTextError

- `type` ("error", required)
- `error` (AnthropicTextErrorError, required)

### OpenAiTextErrorError

- `message` (string, required) — English sentence that states the cause.
- `type` (string, optional)
- `code` (string, optional) — BeatAPI error code, for example `insufficient_credits` or `rate_limit_exceeded`.

### AnthropicTextErrorError

- `type` (string, required)
- `message` (string, required) — English sentence that states the cause.

## Examples

**Response**

```json
{
  "object": "list",
  "data": [
    {
      "id": "claude-fable-5-1",
      "object": "model",
      "created": 1788220800,
      "owned_by": "beatapi"
    }
  ]
}
```

**SDK Code**

```python Text_listTextModels_example
import requests

url = "https://api.beatapi.io/v1/models"

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

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

print(response.json())
```

```javascript Text_listTextModels_example
const url = 'https://api.beatapi.io/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 Text_listTextModels_example
package main

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

func main() {

	url := "https://api.beatapi.io/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 Text_listTextModels_example
require 'uri'
require 'net/http'

url = URI("https://api.beatapi.io/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 Text_listTextModels_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.beatapi.io/v1/models")
  .header("Authorization", "Bearer <token>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

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

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

```csharp Text_listTextModels_example
using RestSharp;

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

```swift Text_listTextModels_example
import Foundation

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.beatapi.io/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()
```