# OrcaRouter (OpenAI-compatible LLM proxy) (`continuum-ai-corp/orcarouter`) Actor

Use OrcaRouter's OpenAI-compatible LLM router on Apify — OpenAI, Anthropic, Gemini, Grok, DeepSeek, Qwen and an adaptive auto router through one endpoint. Bring your own OrcaRouter API key (sk-orca-).

- **URL**: https://apify.com/continuum-ai-corp/orcarouter.md
- **Developed by:** [Continuum AI Corp](https://apify.com/continuum-ai-corp) (community)
- **Categories:** AI, Integrations
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-usage

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## OrcaRouter (OpenAI-compatible proxy) for Apify

Use [OrcaRouter](https://www.orcarouter.ai) — an OpenAI-compatible LLM router that gives you one
endpoint for models from OpenAI, Anthropic, Google, xAI, DeepSeek, Qwen and more, plus an adaptive
`orcarouter/auto` router — from inside the Apify platform.

This Actor runs in **Standby mode** as a small OpenAI-compatible HTTP proxy. You **bring your own
OrcaRouter API key** (`sk-orca-...`); requests are forwarded to `https://api.orcarouter.ai/v1` and
billed to your OrcaRouter account. Apify only bills the Standby compute.

> Disclosure: I'm an engineer on the OrcaRouter team.

### Why use it

If you build Actors or AI agents on Apify, this gives you an OrcaRouter LLM backend that lives in
the Apify ecosystem — a single OpenAI-compatible URL you can point any client or agent framework at,
without writing your own proxy.

### Get an OrcaRouter API key

Sign up at [www.orcarouter.ai](https://www.orcarouter.ai) and create a key in the
[console](https://www.orcarouter.ai/console). Keys start with `sk-orca-`.

### Use it (Standby)

Start the Actor in Standby mode. You get a static URL, e.g.
`https://<your-standby-host>.apify.actor`. The OpenAI-compatible base is that host + `/api/v1`.

Calling a Standby Actor requires your **Apify API token** (to authenticate to the Apify platform).
You provide your **OrcaRouter key** in one of two ways:

**Option A — key stored in the Actor input (recommended).**
Set `orcaRouterApiKey` in the Actor input. Then authenticate to Apify with your Apify token:

```python
from openai import OpenAI

client = OpenAI(
    base_url="https://<your-standby-host>.apify.actor/api/v1",
    api_key="<YOUR_APIFY_TOKEN>",  # authenticates to Apify; the OrcaRouter key is read from the Actor input
)

resp = client.chat.completions.create(
    model="orcarouter/auto",
    messages=[{"role": "user", "content": "Hello from Apify!"}],
)
print(resp.choices[0].message.content)
````

**Option B — bring the key per request.**
Pass your Apify token in the URL (`?token=`) and your OrcaRouter key as the OpenAI `api_key`:

```python
client = OpenAI(
    base_url="https://<your-standby-host>.apify.actor/api/v1?token=<YOUR_APIFY_TOKEN>",
    api_key="sk-orca-...",  # forwarded upstream to OrcaRouter
)
```

You can also pass the OrcaRouter key explicitly with an `X-OrcaRouter-Api-Key` header.

### Models

Use any model id OrcaRouter serves, namespaced by provider, plus the adaptive router:

| Model id | Notes |
|---|---|
| `orcarouter/auto` | Adaptive router — picks an upstream per request (configurable in the OrcaRouter console) |
| `openai/gpt-5.5` | OpenAI flagship |
| `anthropic/claude-opus-4.8` | Anthropic flagship (reasoning model — do not send `temperature`) |
| `google/gemini-3.5-flash` | Google flagship |
| `grok/grok-4.3`, `deepseek/deepseek-v4-pro`, `qwen/qwen3.7-max`, ... | See the full catalog |

Full catalog: [www.orcarouter.ai/models](https://www.orcarouter.ai/models). A bare model name (e.g.
`auto`) is automatically namespaced to `orcarouter/auto`.

Supported endpoints mirror OrcaRouter: `/chat/completions`, `/messages`, `/embeddings`, `/models`.

### Local development

```bash
npm install
npm test                       # unit + behavior tests (fake upstream, no key needed)
ORCAROUTER_API_KEY=sk-orca-... apify run   # run the Standby proxy locally
node scripts/orcarouter-live-test.mjs      # end-to-end live test against real OrcaRouter
```

Environment variables: `ORCAROUTER_API_KEY` (fallback key), `ORCAROUTER_API_BASE_URL` (override
upstream, default `https://api.orcarouter.ai/v1`), `ORCAROUTER_HTTP_REFERER` / `ORCAROUTER_X_TITLE`
(attribution).

### License

Apache-2.0.

# Actor input Schema

## `orcaRouterApiKey` (type: `string`):

Your OrcaRouter API key (starts with sk-orca-). Get one at https://www.orcarouter.ai/console. Used by the proxy to call OrcaRouter on your behalf. You can also pass the key per-request via an `Authorization: Bearer sk-orca-...` or `X-OrcaRouter-Api-Key` header instead of setting it here.

## Actor input object example

```json
{}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("continuum-ai-corp/orcarouter").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("continuum-ai-corp/orcarouter").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call continuum-ai-corp/orcarouter --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=continuum-ai-corp/orcarouter",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "OrcaRouter (OpenAI-compatible LLM proxy)",
        "description": "Use OrcaRouter's OpenAI-compatible LLM router on Apify — OpenAI, Anthropic, Gemini, Grok, DeepSeek, Qwen and an adaptive auto router through one endpoint. Bring your own OrcaRouter API key (sk-orca-).",
        "version": "0.1",
        "x-build-id": "nrWldVYHBxFFaFp0w"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/continuum-ai-corp~orcarouter/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-continuum-ai-corp-orcarouter",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/continuum-ai-corp~orcarouter/runs": {
            "post": {
                "operationId": "runs-sync-continuum-ai-corp-orcarouter",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/continuum-ai-corp~orcarouter/run-sync": {
            "post": {
                "operationId": "run-sync-continuum-ai-corp-orcarouter",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "orcaRouterApiKey": {
                        "title": "OrcaRouter API key",
                        "type": "string",
                        "description": "Your OrcaRouter API key (starts with sk-orca-). Get one at https://www.orcarouter.ai/console. Used by the proxy to call OrcaRouter on your behalf. You can also pass the key per-request via an `Authorization: Bearer sk-orca-...` or `X-OrcaRouter-Api-Key` header instead of setting it here."
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
