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

> ## Agent Instructions
> Orq.ai is the control plane for model and MCP traffic: one key reaches the workspace's enabled models, MCP servers, and resources. The setup depends on where the agent runs.
> Hosted assistant (ChatGPT, claude.ai, a hosted sandbox): install nothing. Tell the human to add https://my.orq.ai/v2/mcp as a remote MCP connector and finish the Orq.ai sign-in. With OAuth, send no Authorization header; otherwise send an API key as a bearer token.
> Local coding agent (Claude Code, Codex, Cursor, OpenCode): run `curl -fsSL https://cli.orq.ai/install.sh | sh`. It installs the CLI and runs `orq setup`, which signs in, writes a project-scoped key to `~/.orq/env`, and wires the detected agents through the AI Gateway. It can also add the Orq MCP server and Orq Skills, the workflows for agents, evaluations, and traces: https://docs.orq.ai/ai-studio/integrations/code-assistants/orq-skills.md. Verify with `orq status`.
> Headless or CI: read `ORQ_API_KEY` from the environment; a human creates the key at https://docs.orq.ai/ai-studio/organization/api-keys.md.
> Send model traffic to https://my.orq.ai/v3/router with `Authorization: Bearer $ORQ_API_KEY`; the Anthropic SDK uses https://my.orq.ai/v3/anthropic. New integrations go on `/v3/router`: `/v2/router` stays published for backward compatibility, and `orq.prompt` works only on `/v2/router/chat/completions`.
> Enable a model for the workspace and use its exact `provider/model` id. `POST /v2/workspace-models` enables a model, and a call fails while the workspace has neither credits nor a provider key.
> On `/chat/completions`, a reasoning model rejects `tools` with a `reasoning_effort` other than `none`; `/responses` keeps reasoning.
> On a failure, branch on `error.code` and follow `error.doc_url`; a budget rejection answers 429.

# Live SDK Reference

> SDK reference for the Live API, available in Node.js and Python.

## Live

### Create Session

Exchanges a WebRTC SDP offer for an answer and starts a GPT-Live session. Apply the returned answer to the peer connection and send Live events over the data channel. Requires an API key with `realtime.execute`.

Voice usage is billed by the second at the active or standby rate. Set `wake_policy.type` to `speech` to start inference on speech. Set `idle_timeout_s` to return the session to standby after inactivity. Use client delegation to run backend work in your application.

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
import orq_ai_sdk
from orq_ai_sdk import Orq
import os

with Orq(
    api_key=os.getenv("ORQ_API_KEY"),
) as orq:

    res = orq.live.create_session(session=orq_ai_sdk.Session(
        idle_timeout_s=15,
        model="openai/gpt-live-1.1",
        wake_policy=orq_ai_sdk.WakePolicy(
            type="speech",
        ),
    ), transport={
        "sdp": "<SDP offer>",
        "type": "webrtc",
    })

    # Handle response
    print(res)

```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
import { Orq } from "@orq-ai/node";

const orq = new Orq({
  apiKey: process.env["ORQ_API_KEY"] ?? "",
});

async function run() {
  const result = await orq.live.createSession({
    session: {
      idleTimeoutS: 15,
      model: "openai/gpt-live-1.1",
      wakePolicy: {
        type: "speech",
      },
    },
    transport: {
      sdp: "<SDP offer>",
      type: "webrtc",
    },
  });

  console.log(result);
}

run();
```

**Parameters**

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
    "session": {  # required
        "audio": Dict[str, Any],  # optional
        "delegation": {  # optional
            "type": Literal["client"],  # required
        },
        "idle_timeout_s": Optional[int],
        "instructions": Optional[str],
        "model": str,  # required
        "wake_policy": {  # optional
            "type": Literal["speech"],  # required
            "vad_threshold": Optional[float],
        },
    },
    "transport": {  # required
        "sdp": str,  # required
        "type": Literal["webrtc"],  # required
    },
}
```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  session: {  // required
    audio?: Record<string, any>;
    delegation?: {
      type: "client";  // required
    };
    idleTimeoutS?: number;
    instructions?: string;
    model: string;  // required
    wakePolicy?: {
      type: "speech";  // required
      vadThreshold?: number;
    };
  };
  transport: {  // required
    sdp: string;  // required
    type: "webrtc";  // required
  };
}
```

**Response**

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
    "session": {
        "id": str,
    },
    "transport": {
        "sdp": str,
        "type": Literal["webrtc"],
    },
}
```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  session: {
    id: string;
  };
  transport: {
    sdp: string;
    type: "webrtc";
  };
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.