# Ramp Router — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Route OpenAI-compatible AI requests across leading model providers with one endpoint and transparent Ramp base pricing.

**Category:** AI / LLM | **Website:** [router.com](https://router.com) | **Docs:** [docs.router.com](https://docs.router.com)

Pay-per-use API proxy for Locus Pro. Each call burns credits from your workspace balance.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/credits/ramp-router/`
**Auth:** `Authorization: Bearer <LOCUS_CREDITS_SECRET_KEY>` (an `lcr_` secret key or a scoped `lcac_` agent credential)
**Required header:** `Idempotency-Key: <fresh UUID per call>`. A retry with the same key replays the stored result without a new charge.
**Response:** the provider response after any endpoint-specific normalization. `X-Locus-Credits-Charged` carries the charge and `X-Locus-Credits-Balance` the remaining balance. Insufficient credits return `402` before the provider is called.
**Pricing:** estimated costs below are USD. Locus debits the credit equivalent at your workspace rate.

Full call contract: https://docs.paywithlocus.com/api-reference/introduction

> Using a Pay With Locus wallet key (`claw_` prefix)? Wallet routes are documented separately: https://docs.paywithlocus.com/wrapped-apis/for-agents

## Endpoints

### List models

List every model available to the configured Ramp Router account, including callable IDs, capabilities, context limits, and current base rates.

**Estimated cost:** $0.001 Locus minimum · Ramp base $0

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/ramp-router/models \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Create response

Create a buffered, text-input OpenAI Responses result through Ramp Router with tools and reasoning controls.

**Estimated cost:** Ramp base-rate authorization · UTF-8 input ceiling plus output budget

**Billing:** This estimate is the authorization ceiling. Successful calls settle to the provider-reported usage, and `X-Locus-Credits-Charged` carries the final charge.

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `model` | string | Yes | Ramp Router model id, provider path, or alias exactly as this provider's List models endpoint returns it. Availability is key-scoped; call List models for active IDs and current rates. Examples: gpt-5.6-luna, gpt-5.6-terra, claude-sonnet-5, deepseek-v4-flash, grok-4.6. |
| `input` | string \| array | Yes | Text or OpenAI Responses input items to send to the selected model. |
| `max_output_tokens` | number | No | Positive output-token budget; defaults to 4096 and is capped at 16384. |
| `instructions` | string | No | System or developer guidance for the response. |
| `tools` | array | No | OpenAI-compatible tool definitions available to the model. |
| `reasoning` | object | No | Model-specific reasoning controls such as effort. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/ramp-router/responses \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"model":"gpt-5.6-luna","input":"Reply with exactly one word: pong.","max_output_tokens":16}'
```

### Chat completion

Run a buffered OpenAI Chat Completions request through the same Ramp model catalog and routing layer. Locus translates it onto Ramp's Responses route, so the request and reply keep the Chat Completions shape.

**Estimated cost:** Ramp base rate · input plus requested output tokens

**Billing:** This estimate is the authorization ceiling. Successful calls settle to the provider-reported usage, and `X-Locus-Credits-Charged` carries the final charge.

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `model` | string | Yes | Ramp Router model id, provider path, or alias exactly as this provider's List models endpoint returns it. Availability is key-scoped; call List models for active IDs and current rates. Examples: gpt-5.6-luna, gpt-5.6-terra, claude-sonnet-5, deepseek-v4-flash, grok-4.6. |
| `messages` | array | Yes | Non-empty OpenAI-compatible chat message array. |
| `max_completion_tokens` | number | No | Positive output-token budget; defaults to 4096 and is capped at 16384. |
| `tools` | array | No | OpenAI-compatible function tool definitions available to the model. |
| `response_format` | object | No | OpenAI-compatible structured output configuration. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/ramp-router/chat \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"model":"gpt-5.6-luna","messages":[{"role":"user","content":"Reply with exactly one word: pong."}],"max_completion_tokens":16}'
```

## Next steps

- [All wrapped API providers](https://paywithlocus.com/wapi/index.md): pick another provider.
- [Find and call tools](https://paywithlocus.com/agent/tools.md): price ceilings, async results, and errors.
- [Credits and billing](https://paywithlocus.com/agent/billing.md): what a call costs and how to add credits.
- [Agent docs index](https://paywithlocus.com/agent/index.md): every Locus agent page.