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

# GET /v1/models — list models available to your API key

> Retrieve the list of AI models available to your API key using GET /v1/models. The response format adapts automatically based on your authentication headers.

The `/v1/models` endpoint returns all models that your API key has permission to use. Anyone inspects your request headers and returns the model list in the format that matches your client: OpenAI format by default, Anthropic format when Claude headers are present, or Gemini format when Google headers are present.

***

## GET /v1/models

### Authentication

Pass your API key using the header that matches the format you want in the response:

| Auth method        | Headers required                                            | Response format      |
| ------------------ | ----------------------------------------------------------- | -------------------- |
| OpenAI (default)   | `Authorization: Bearer YOUR_TOKEN`                          | OpenAI model list    |
| Anthropic (Claude) | `x-api-key: YOUR_TOKEN` and `anthropic-version: 2023-06-01` | Anthropic model list |
| Gemini (Google)    | `x-goog-api-key: YOUR_TOKEN`                                | Gemini model list    |

You can also pass the Gemini API key as a `?key=YOUR_TOKEN` query parameter instead of the `x-goog-api-key` header.

### Response (OpenAI format)

When you authenticate with a Bearer API key and no Claude or Gemini headers are present, the response follows the OpenAI models list format:

<ResponseField name="object" type="string">
  Always `"list"`.
</ResponseField>

<ResponseField name="data" type="object[]">
  Array of model objects.

  <Expandable title="model object properties">
    <ResponseField name="id" type="string">
      The model identifier. Use this value in the `model` field of your requests.
    </ResponseField>

    <ResponseField name="object" type="string">
      Always `"model"`.
    </ResponseField>

    <ResponseField name="created" type="integer">
      Unix timestamp for when this model entry was created.
    </ResponseField>

    <ResponseField name="owned_by" type="string">
      The organization that owns the model. For example, `"openai"` or `"system"`.
    </ResponseField>
  </Expandable>
</ResponseField>

***

## GET /v1/models/:model

Retrieve information about a specific model by its ID.

```
GET /v1/models/gpt-5.4
```

Returns a single model object in the same format as an entry in the `data` array above. When Claude headers are present, this endpoint returns the Anthropic model format instead.

***

## Gemini format endpoint

To list models in Gemini format, you can use either of the following paths:

* `GET /v1/models` with `x-goog-api-key` header
* `GET /v1beta/models` with any valid API key

***

### Example

<CodeGroup>
  ```bash curl (OpenAI format) theme={null}
  curl https://api.anyone.ai/v1/models \
    -H "Authorization: Bearer YOUR_TOKEN"
  ```

  ```bash curl (Claude format) theme={null}
  curl https://api.anyone.ai/v1/models \
    -H "x-api-key: YOUR_TOKEN" \
    -H "anthropic-version: 2023-06-01"
  ```

  ```bash curl (Gemini format) theme={null}
  curl "https://api.anyone.ai/v1/models?key=YOUR_TOKEN"
  ```

  ```python python theme={null}
  from openai import OpenAI

  client = OpenAI(
      api_key="YOUR_TOKEN",
      base_url="https://api.anyone.ai/v1",
  )

  models = client.models.list()
  for model in models.data:
      print(model.id)
  ```
</CodeGroup>

### Example response (OpenAI format)

```json theme={null}
{
  "object": "list",
  "data": [
    {
      "id": "gpt-5.4",
      "object": "model",
      "created": 1715367049,
      "owned_by": "openai"
    },
    {
      "id": "claude-sonnet-4-6",
      "object": "model",
      "created": 1715367049,
      "owned_by": "anthropic"
    },
    {
      "id": "gemini-3.1-pro-preview",
      "object": "model",
      "created": 1715367049,
      "owned_by": "google"
    }
  ]
}
```

<Tip>
  The models returned reflect what your specific API key is authorized to use. If you expect a model to appear but it does not, ask your Anyone administrator to grant access via the API key settings in the dashboard.
</Tip>
