# List models via the API

> Get the models your API key can call with GET /v1/models on GoiAPI, in OpenAI or Anthropic format, sorted by name. Listing models is free of charge.

Source: https://goiapi.com/en/docs/list-models

```http
GET https://api.goiapi.com/v1/models
GET https://api.goiapi.com/v1/models/{id}
```

Returns the models your key is allowed to use (if the key is restricted to certain models, only those), sorted by name. Listing models is **free**. See per-model prices on [Pricing](https://goiapi.com/en/pricing).

## Response format

OpenAI format by default:

```json
{
  "object": "list",
  "data": [{ "id": "claude-haiku-5-5", "object": "model", "created": 1764000000, "owned_by": "anthropic" }]
}
```

With an `anthropic-version` header, the response uses the Anthropic format:

```json
{
  "data": [
    {
      "type": "model",
      "id": "claude-haiku-5-5",
      "display_name": "…",
      "created_at": "2026-11-29T00:00:00Z"
    }
  ],
  "has_more": false,
  "first_id": "claude-haiku-5-5",
  "last_id": "claude-haiku-5-5"
}
```

`GET /v1/models/{id}` returns a single model in the same format. If the model does not exist or your key is not allowed to use it, you get a `404` error.
