Get started

Quickstart

Send your first request through Router in a few minutes.

Before you start

Review signup eligibility before creating an account.

Using Router with coding agents

Router pairs perfectly with your coding agents. We provide automatic setup for many popular coding agents, including Claude Code, Codex, OpenCode, Pi, Hermes, and Conductor. Any other harness that supports the OpenAI Responses API also works with Router.

See Coding agents for automatic integrations and manual setup.

For Claude Code, Codex, or OpenCode, install the Ramp CLI and configure Router models and connectors:

curl -fsSL https://agents.ramp.com/install.sh | sh -s -- --no-skills
ramp router configure --connectors

If the installer updates your PATH, open a new terminal before running ramp router configure --connectors.

Select your agents, then sign in with Ramp in your browser and approve connector access. Setup can create a Router API key for you. Connect the apps you want to use on Connectors, then restart your agent. If the Connectors page isn't available, ask your Ramp administrator about Router access. On Windows, run these commands in Git Bash.

For other agents or model-only setup, use the Router installer. To refresh models later, run ramp router refresh.

On a machine without a browser, such as CI or a remote server, configure models with a key from API keys:

curl -fsSL https://router.com/install.sh | sh -s -- --api-key 'your-router-key'

Connector setup requires browser approval, even when you supply an API key.

The rest of this quickstart walks through the API directly with curl.

1. Create an API key

Open API keys in the Router dashboard and create a key.

Note that the secret is shown only once, so add it to your .env file before closing the dialog:

RAMP_ROUTER_API_KEY=your-router-key

To limit what the key can spend, click its edit button (the pencil) on API keys after you create it, and set a lifetime or recurring key limit.

To reuse saved routing settings, choose a Workload when creating or editing your key. You can create one on the Workloads page, or select a different workload for an individual request with workload_slug.

2. List your models

Each key has access to its own set of models, so start by listing the ones available to yours:

curl --fail-with-body \
  "https://api.router.com/v1/models" \
  -H "Authorization: Bearer $RAMP_ROUTER_API_KEY"

The response uses the OpenAI model-list shape:

{
  "object": "list",
  "data": [
    {
      "id": "your-model-id",
      "object": "model",
      "owned_by": "openai"
    }
  ]
}

3. Create a response

Use an id from the previous step as model:

curl --fail-with-body \
  "https://api.router.com/v1/responses" \
  -H "Authorization: Bearer $RAMP_ROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -H "X-Request-Id: quickstart-001" \
  -d '{
    "model": "your-model-id",
    "input": "Reply with exactly one word: pong.",
    "max_output_tokens": 16
  }'

A successful call returns an OpenAI Response object. For a simple text result, look for an output_text content item inside output.

Router returns the x-request-id and x-trace-id headers in its response. Log them so you can trace a failure later.

4. Try streaming

Set stream to true to receive OpenAI Responses server-sent events:

curl --no-buffer --fail-with-body \
  "https://api.router.com/v1/responses" \
  -H "Authorization: Bearer $RAMP_ROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "your-model-id",
    "input": "Write one sentence about reliable software.",
    "stream": true
  }'

5. Verify usage

Open Logs to see each request's model, provider, status, tokens, cost, and latency. Note that a request can take a short time to appear after it completes.

Next steps

Connect your app with an SDK or framework, or read Choose a model.