Use Petrova from your coding tool

Fixture onlyChecked 16 November 2026

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:

SettingValue today (local, fixture mode)Value when the hosted gateway is live
Base URLhttp://127.0.0.1:4100https://api.petrova.sh (placeholder, not live)
API keya 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.

ToolWorks today throughGuide
Claude CodeANTHROPIC_BASE_URLclaude-code.md
opencodecustom provider (or models.dev listing, draft)opencode.md
OpenClawcustom provider (or ClawHub plugin, draft)openclaw.md
ClineAnthropic provider, custom base URLcline.md
Roo CodeAnthropic provider, custom base URLroo.md
Kilo CodeAnthropic provider, custom base URLkilo.md
Zedlanguage_models.anthropic.api_urlzed.md
AiderAnthropic base URL env varaider.md
CodexOpenAI Responses provider, wire_api = "responses"codex.md
Any MCP clientthe 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.