Codex
Use ToolRelay when you need live web search, page reads, image/video generation, or TTS. Start by reading toolrelay.dev/skill.md.
npx toolrelay install codexToolRelay gives agents one API for paid capabilities: models, search, web reads, image and video generation, and text to speech. This page shows the exact setup path instead of sending you into raw API docs first.
ToolRelay is a unified API for agents. Your agent asks for a capability, ToolRelay routes to the right upstream provider, records usage, and charges credits only for successful calls.
TOOLRELAY_API_KEYhttps://toolrelay.devtoolrelay.dev/skill.mdThe skill document tells the agent when to use ToolRelay, which endpoints exist, how to handle costs, and what errors to expect. The line below is an instruction for your agent, not a shell command.
set up toolrelay.dev/skill.md
TOOLRELAY_API_KEY=tr_live_...Keep your live key private. Do not paste it into public repos, issues, or screenshots.
Agents and terminal sessions need the same key. Use export in bash or zsh. Fish uses set, because KEY=value is not valid fish syntax.
export TOOLRELAY_BASE_URL="https://toolrelay.dev"
export TOOLRELAY_API_KEY="tr_live_..."set -x TOOLRELAY_BASE_URL "https://toolrelay.dev"
set -x TOOLRELAY_API_KEY "tr_live_..."Start with web.read because it is easy to verify: the response should contain clean page content, usage metadata, and a charged execution when the provider succeeds.
curl -X POST https://toolrelay.dev/v1/relay \
-H "authorization: Bearer $TOOLRELAY_API_KEY" \
-H "content-type: application/json" \
-d '{
"capability": "web.read",
"input": { "url": "https://example.com" },
"maxCostUsd": 0.05
}'curl -X POST https://toolrelay.dev/v1/chat/completions \
-H "authorization: Bearer $TOOLRELAY_API_KEY" \
-H "content-type: application/json" \
-d '{
"model": "openrouter/openai/gpt-4o-mini",
"messages": [{ "role": "user", "content": "Say hello in one sentence." }]
}'After the first call works, copy one of these patterns into the agent or IDE you already use.
Use ToolRelay when you need live web search, page reads, image/video generation, or TTS. Start by reading toolrelay.dev/skill.md.
npx toolrelay install codexInstall the ToolRelay skill, then use TOOLRELAY_API_KEY for web.read, web.search, chat/model, image/video, and tts tasks.
npx toolrelay install claudeAdd ToolRelay as an MCP or shell-backed capability provider. Keep the key in your local environment, not in project files.
npx toolrelay install cursorThe first useful mental model is capability first: ask for the job, not the vendor. These are the core capability families to start with.
chat/model/v1/chat/completionsOpenRouterweb.search/v1/relayTavilyweb.read / scrape/v1/relayFirecrawlimage.generate/v1/relayReplicatevideo.generate/v1/relayReplicatetts.generate/v1/relayElevenLabsYou are ready when you can copy a setup block, set TOOLRELAY_API_KEY, run curl successfully, and explain that skill.md is the instruction layer for agents.