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

# Models

> List available platform and BYOK models, and proxy platform model calls

## Availability

`GET /v1/models/available` returns the models currently visible to the caller.

Platform models are served by Runtools-managed capacity and billed by token usage. BYOK models use user- or org-provided provider keys and are marked available only when the required secret exists.

<Note>
  The API intentionally does not expose internal platform provider routing. Customers should treat Platform models as Runtools-managed models.
</Note>

<ResponseField name="platform" type="array">
  Platform model entries with `model`, `displayName`, and `available`.
</ResponseField>

<ResponseField name="byok" type="array">
  BYOK model entries with `model`, `displayName`, `requiresSecret`, and `available`.
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl https://api.runtools.ai/v1/models/available \
    -H "X-API-Key: $RUNTOOLS_API_KEY"
  ```
</RequestExample>

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "data": {
      "platform": [
        {
          "model": "claude-opus-4.6",
          "displayName": "Claude Opus 4.6",
          "available": true
        }
      ],
      "byok": [
        {
          "model": "gpt-5",
          "displayName": "GPT-5",
          "requiresSecret": "OPENAI_API_KEY",
          "available": false
        }
      ]
    }
  }
  ```
</ResponseExample>

## Platform Model Proxy

Advanced local runtimes can call the platform model proxy directly. Normal agent runs do not need this endpoint; `POST /v1/run` handles model calls for you.

| Method | Path                     | Description                                             |
| ------ | ------------------------ | ------------------------------------------------------- |
| `POST` | `/v1/model-proxy`        | Non-streaming platform model call                       |
| `POST` | `/v1/model-proxy/stream` | Streaming platform model call as newline-delimited JSON |

<ParamField body="model" type="string" required>
  Model identifier.
</ParamField>

<ParamField body="options" type="object" required>
  Provider-neutral generation options passed through to the model gateway.
</ParamField>

<ParamField body="tier" type="string" default="platform">
  Only `platform` is accepted by the public model proxy. BYOK calls use local or agent-host credentials instead.
</ParamField>

```bash cURL theme={null}
curl -X POST https://api.runtools.ai/v1/model-proxy \
  -H "X-API-Key: $RUNTOOLS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "claude-opus-4.6",
    "options": {
      "messages": [
        { "role": "user", "content": "Say hello." }
      ]
    }
  }'
```

The streaming variant returns:

```text theme={null}
Content-Type: application/x-ndjson
Cache-Control: no-cache
```

## Billing

Platform model calls are charged by token usage. BYOK model usage is not charged as Runtools platform inference usage, because the call uses the customer's own key.
