Use Petrova from your coding tool
In short
- Any tool that lets you set an Anthropic or OpenAI base URL and key works.
- Two values to set: the base URL and a Petrova key.
- Each guide says whether the URL ends in /v1.
These guides are for the model gateway, Petrova's second product. Tools come first: to give a coding agent paid tools, say "Set up Petrova from <your origin>/skill.md" to it, or see the agent's journey.
Petrova speaks the Anthropic Messages API (POST /v1/messages, POST /v1/messages/count_tokens) and the OpenAI Chat Completions and Responses APIs (POST /v1/chat/completions, POST /v1/responses). Any tool that lets you set a custom Anthropic or OpenAI base URL and key works. Two values:
| Setting | Value today (local, fixture mode) | Value when the hosted gateway is live |
|---|---|---|
| Base URL | http://127.0.0.1:4100 | https://api.petrova.sh (placeholder, not live) |
| API key | a ptrv_test_... key from npm run sandbox:key -- --spend (quote:write, needed on /v1/messages) | a key from the Petrova dashboard |
Today the gateway runs in fixture mode: answers are canned and no provider is called. The guides below are the exact settings to use once it is live; only the base URL changes.
Some tools want the base URL with /v1 on the end and some without. Each guide says which: Anthropic-format tools use it without /v1, OpenAI-format tools (Codex, the OpenAI SDK) with /v1.
| Tool | Works today through | Guide |
|---|---|---|
| Claude Code | ANTHROPIC_BASE_URL | claude-code.md |
| opencode | custom provider (or models.dev listing, draft) | opencode.md |
| OpenClaw | custom provider (or ClawHub plugin, draft) | openclaw.md |
| Cline | Anthropic provider, custom base URL | cline.md |
| Roo Code | Anthropic provider, custom base URL | roo.md |
| Kilo Code | Anthropic provider, custom base URL | kilo.md |
| Zed | language_models.anthropic.api_url | zed.md |
| Aider | Anthropic base URL env var | aider.md |
| Codex | OpenAI Responses provider, wire_api = "responses" | codex.md |
| Any MCP client | the Petrova MCP server (npm run mcp) | MCP |
Using your own AWS credits instead of Petrova's supply? Connect AWS once (see aws-credits.md); the tool settings stay the same.
Last checked against the code: 16 November 2026. Something wrong? The source of this page is in the repository, so a fix is one edit.