> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nodesms.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Models

> Get the list of currently available models. Native OpenAI format.

The return format is automatically determined by the request headers:

* Returns Anthropic format when the `x-api-key` and `anthropic-version` headers are present
* Returns Gemini format when the `x-goog-api-key` header or `key` query parameter is present
* Returns OpenAI format in all other cases

## Headers

**Authorization** `string` *required*

Bearer token authentication. Format: `Authorization: Bearer sk-xxxxxx`

**x-api-key** `string`

Anthropic API Key (for Claude format)

**anthropic-version** `string`

Anthropic API version

**x-goog-api-key** `string`

Google API Key (for Gemini format)

## Query Parameters

**key** `string`

Google API Key (for Gemini format)

## Response

### 200 Successfully retrieved model list

Format: `application/json`

**object** `string`

Object type

**data** `object[]`

Model list

**Properties**

**id** `string`

Model ID

**object** `string`

Object type

**created** `integer`

Creation timestamp

**owned\_by** `string`

Model owner

### 401 Authentication failed

Format: `application/json`

**error** `object`

Error information

**Properties**

**message** `string`

Error message

**type** `string`

Error type

**param** `string | null`

Related parameter

**code** `string | null`

Error code

```bash cURL theme={"dark"}
curl -X GET "https://t.ato2.nodesms.com/v1/models" \
  -H "Authorization: Bearer $API_KEY"
```

```python Python theme={"dark"}
from openai import OpenAI

client = OpenAI(
    api_key="sk-xxxxx",
    base_url="https://t.ato2.nodesms.com/v1"
)

models = client.models.list()
print(models)
```

```json 200 theme={"dark"}
{
  "object": "list",
  "data": [
    {
      "id": "string",
      "object": "model",
      "created": 0,
      "owned_by": "string"
    }
  ]
}
```

```json 401 theme={"dark"}
{
  "error": {
    "message": "string",
    "type": "string",
    "param": null,
    "code": null
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.