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

# OpenAI compatibility

> Point the official OpenAI SDK at Orbit. Chat completions and model listing work as they do today.

Orbit implements OpenAI Chat Completions. Set `base_url` to Orbit and `api_key` to your `sk-orbit-` key. Leave the rest of your code as-is.

## Base URL

```txt theme={"theme":"github-dark"}
https://api.tryorbit.cloud/api/v1
```

The official client appends `/chat/completions` and `/models` itself.

| Method | Path                | Purpose                |
| ------ | ------------------- | ---------------------- |
| `POST` | `/chat/completions` | Chat, tools, streaming |
| `GET`  | `/models`           | List catalogue models  |

Auth header: `Authorization: Bearer $ORBIT_API_KEY`

## Examples

<Tabs>
  <Tab title="Python">
    ```python theme={"theme":"github-dark"}
    import os
    from openai import OpenAI

    client = OpenAI(
        api_key=os.environ["ORBIT_API_KEY"],
        base_url="https://api.tryorbit.cloud/api/v1",
    )

    stream = client.chat.completions.create(
        model="gpt-5-6-sol",
        messages=[{"role": "user", "content": "Summarize this diff."}],
        stream=True,
    )

    for chunk in stream:
        delta = chunk.choices[0].delta.content
        if delta:
            print(delta, end="")
    ```
  </Tab>

  <Tab title="Node.js">
    ```ts theme={"theme":"github-dark"}
    import OpenAI from "openai";

    const client = new OpenAI({
      apiKey: process.env.ORBIT_API_KEY,
      baseURL: "https://api.tryorbit.cloud/api/v1",
    });

    const stream = await client.chat.completions.create({
      model: "gpt-5-6-sol",
      messages: [{ role: "user", content: "Summarize this diff." }],
      stream: true,
    });

    for await (const chunk of stream) {
      const delta = chunk.choices[0]?.delta?.content;
      if (delta) process.stdout.write(delta);
    }
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={"theme":"github-dark"}
    curl https://api.tryorbit.cloud/api/v1/chat/completions \
      -H "Authorization: Bearer $ORBIT_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "model": "gpt-5-6-sol",
        "messages": [{ "role": "user", "content": "Summarize this diff." }],
        "stream": false
      }'
    ```
  </Tab>
</Tabs>

## Supported fields

Orbit understands this subset of Chat Completions:

* `model` (required) — catalogue slug
* `messages` (required)
* `tools` and `tool_choice`
* `max_tokens` / `max_completion_tokens`
* `temperature`, `top_p`, `stop`
* `stream` and `stream_options.include_usage`

<Note>
  `response_format` / JSON mode, `n > 1`, `logprobs`, and image/vision content parts are accepted but ignored in this pass.
</Note>

## Cursor and other OpenAI-compatible tools

Any client that can override the OpenAI base URL can use this same endpoint. See [Cursor](/agents/cursor).
