# Open models

[RightNow AI](https://www.rightnowai.co/) / [Open models](https://www.rightnowai.co/docs/open-models)

Updated 2026-11-11

Chat completions and Responses are chat-compatible. Messages follows the compatible Messages request and response protocol. Use a workspace API key; credits or an existing coding plan pay for usage on the open-models service.

**Connection**

| Connection | Value |
| --- | --- |
| API base | `https://api.runinfra.ai/v1` |
| Workspace key | `rp_...` |
| Process variable | `RUNINFRA_GATEWAY_KEY` |
| Billing | The existing funding rules of your open-model account. |

Replace `MODEL_ID` with an available id from [Open models](https://runinfra.ai/inference-api?utm_source=rightnowai.co&utm_medium=referral&utm_content=docs-open-models); read current capabilities, limits and prices from `GET /v1/models`.

[Call an open model](https://www.rightnowai.co/docs/open-models/quickstart) or [use the RightNow model](https://www.rightnowai.co/docs/system-zero/quickstart). Each API has its own key and contract.

> Using a coding agent? Your agent can set up the open-models service for you. Copy the prompt from [Set up with your coding agent](https://www.rightnowai.co/docs/open-models/guides/coding-agents).

## Call a hosted model

Set the base URL to `https://api.runinfra.ai/v1`, use a workspace API key, and pass a model id.

**cURL**

```shell
curl https://api.runinfra.ai/v1/chat/completions \
  -H "Authorization: Bearer $RUNINFRA_GATEWAY_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "MODEL_ID",
    "messages": [{"role": "user", "content": "Write a TypeScript retry helper."}],
    "max_tokens": 16384
  }'
```

**Python**

```python
import os
from openai import OpenAI

client = OpenAI(
    base_url="https://api.runinfra.ai/v1",
    api_key=os.environ["RUNINFRA_GATEWAY_KEY"],
)
response = client.chat.completions.create(
    model="MODEL_ID",
    messages=[{"role": "user", "content": "Write a TypeScript retry helper."}],
    max_tokens=16384,
)
print(response.choices[0].message.content)
```

**TypeScript**

```typescript
import OpenAI from "openai";

// Server side only: never expose this key in browser code.
const client = new OpenAI({
  baseURL: "https://api.runinfra.ai/v1",
  apiKey: process.env.RUNINFRA_GATEWAY_KEY,
});
const response = await client.chat.completions.create({
  model: "MODEL_ID",
  messages: [{ role: "user", content: "Write a TypeScript retry helper." }],
  max_tokens: 16384,
});
console.log(response.choices[0]?.message?.content);
```

`GET /v1/models` is the authoritative list of hosted chat models. It also reports when one is temporarily paused.

[### The open models API quickstart Key, base URL, first call.](https://www.rightnowai.co/docs/open-models/quickstart) [### Compatible clients The chain client, the routing client, the indexing client, AI SDK, plain fetch.](https://www.rightnowai.co/docs/sdks/open-models) [### Rate limits Request, concurrency, and token limits by operation.](https://www.rightnowai.co/docs/open-models/rate-limits) [### Coding agents Copy one prompt. Your coding agent sets up the open-models service for you.](https://www.rightnowai.co/docs/open-models/guides/coding-agents)

## Pricing, access and help

[### Pricing and credits Pay as you go and $5 minimum top-up.](https://www.rightnowai.co/docs/open-models/pricing) [### Account and access Sign up, keys, workspaces, deletion.](https://www.rightnowai.co/docs/open-models/account) [### Troubleshooting 401, 402, 403, 429, 503, and what to do about each.](https://www.rightnowai.co/docs/open-models/troubleshooting)

[Source reference](https://runinfra.ai/docs/?utm_source=rightnowai.co&utm_medium=referral&utm_content=docs-open-models)

[API schema](https://runinfra.ai/docs/api-reference/openapi.json?utm_source=rightnowai.co&utm_medium=referral&utm_content=docs-open-models)

## Next

[Call an open model](https://www.rightnowai.co/docs/open-models/quickstart)
