Skip to main content

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.

Already running LLM calls? Point them at the AI Router to route across providers, add fallbacks, and centralize cost and latency tracking, with a single base URL.
1

Create your orq.ai account

Sign up for a free orq.ai account and set up your workspace.
2

Connect a provider

The AI Router routes requests through provider credentials configured in the workspace, keeping spend and data fully under control.
  1. Open the AI Studio and go to AI Router > Providers.
  2. Pick a provider (this quickstart uses OpenAI) and click Connect.
  3. Choose Setup your own API key and paste the provider key.
No OpenAI key yet? Create one at platform.openai.com/api-keys. For other providers, see the providers overview.
Adding OpenAI API key in the AI Router

Supported providers

See the full list of supported model providers and how to connect them.
3

Get your orq.ai API key

Open Organization > API Keys in the left sidebar. Click Create API Key, give it a name, and copy it.Then open a terminal and run the command below, replacing your-api-key-here with the key you just copied. The code samples in the next step read it from this environment variable.
export ORQ_API_KEY="your-api-key-here"
4

Make your first request

Send a request to the unified /v3/router/chat/completions endpoint. Use the provider-prefixed model id (e.g. openai/gpt-4o).
curl -X POST https://api.orq.ai/v3/router/chat/completions \
  -H "Authorization: Bearer $ORQ_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openai/gpt-4o",
    "messages": [{"role": "user", "content": "Hello, world!"}]
  }'
A successful response looks like:
JSON
{
  "id": "01K7M0YTJ6X90VHPRDMM5GEC4R",
  "object": "chat.completion",
  "model": "gpt-4o-2024-08-06",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "Hello! This is a response. How can I assist you today?"
      },
      "finish_reason": "stop"
    }
  ],
  "usage": { "prompt_tokens": 14, "completion_tokens": 14, "total_tokens": 28 }
}
5

Review the request

Open the AI Studio and head to AI Router > Activity to see the request, model, latency, token counts, and cost. Each call is also available as a full trace under Traces.

Troubleshooting

  1. Confirm echo $ORQ_API_KEY returns the value you expect.
  2. Verify the key under Organization > API Keys is active.
  3. Make sure the Authorization: Bearer header is set, not a query parameter.
{"code":401,"error":"API key for openai is not configured in your workspace."}
Go to AI Router > Providers, open the matching provider, and click Setup your own API key.
Some models require an explicit toggle in the AI Router. Search for the model id and enable it before invoking it.

Capabilities

Pair your first request with built-in AI Router features.

Multimodal

Send text, images, audio, and PDFs through the same unified endpoint.

Streaming

Stream tokens as they generate for real-time responses in your UI.

Fallbacks

Automatically retry on a backup model when the primary fails or times out.

Identity tracking

Attribute usage and cost to a specific end user or tenant.

Thread management

Persist conversation history across requests with automatic thread storage.

Supported models

Browse supported models from OpenAI, Anthropic, Google, AWS, and more.