OpenAI-compatible setup
Connect NexRelay to Codex, Claude, and OpenAI SDKs
NexRelay is a prepaid API gateway. Add balance, create an API key, copy the setup command for your client, and restart the client. Do not paste raw JSON into Windows CMD.
Codex
Use the one-click setup command from your API key page. Paste it into Windows CMD, restart Codex, and start using NexRelay.
Claude
Create a NexRelay key, copy the Claude setup command, paste it into CMD, then restart the client.
OpenAI SDKs
For OpenAI-compatible SDKs, set the NexRelay base URL and your API key. Keep the key private.
Gemini-compatible tools
For tools that allow a custom compatible endpoint, use the gateway URL and a NexRelay API key.
Setup in four steps
Add prepaid balance
Open Pricing or Wallet and add credits. Requests stop automatically when balance runs out.
Create an API key
Open API Keys and click Create API key. Copy the full key when it is shown.
Copy setup
Use the setup button for Codex, Claude, or your OpenAI-compatible client.
Restart the client
Paste the copied command into Windows CMD, press Enter, then close and reopen the client.
Manual configuration values
Most users should use the setup button. Use these values only when a developer tool asks for a custom base URL.
OpenAI-compatible base URL
https://nexrelay-api.xyz/api/v1App URL
https://nexrelay-api.xyzDefault model
gpt-5.5What success looks like
After restart, your client can send requests through NexRelay. Usage appears in request-level logs with key, model, token meters, status, and billed amount.
Common mistake
Windows CMD cannot run a JSON block that starts with {. Only paste the full command copied from the setup button.
Troubleshooting
401
The key is missing, incomplete, deleted, or the client is not using the NexRelay base URL.
402
The NexRelay account balance or key budget is exhausted. Add balance or raise the key budget.
Login issue
An API key is not a website password. Sign in to the website with email, and use API keys only inside clients.
Related developer guides
OpenAI-compatible relay
How relays add routing, billing controls, and request logs around compatible API calls.
API budget control
How prepaid balance, daily budgets, and max output caps reduce surprise AI API costs.
Request-level logs
What to log for billing auditability: request id, key, model, tokens, status, and amount.