CLI setup
NexoAI works best with developer tools that let you choose an OpenAI-compatible or Anthropic-compatible base URL. Your named virtual key and prepaid wallet stay the same; each tool stores them differently.
Choisissez votre client
| Tool | Request shape | NexoAI setup |
|---|---|---|
| Claude Code | Anthropic-compatible | Put ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN in settings.json. |
| Codex | OpenAI Responses | Add the nexoai provider to config.toml and the key to auth.json. |
| Gemini CLI | Gemini-native | Read the compatibility note before configuring; the Gemini model is available through NexoAI's OpenAI shape. |
| Cline, Aider, Continue, and others | OpenAI-compatible | Select a custom OpenAI provider and enter the NexoAI /v1 base. |
Before continuing, create a named key and verify your local runtime.
The shared pieces
Every supported CLI configuration needs three values:
text
Gateway https://api.nexoai.ma
Credential sk-your-key
Model gpt-5.4 (or another model in the NexoAI catalog)Some tools want the gateway root while others want a versioned API base. Follow the value shown on the tool's page: Claude Code uses https://api.nexoai.ma, while Codex and generic OpenAI-compatible clients commonly use https://api.nexoai.ma/v1.
Do not reuse vendor login modes
If a CLI offers “Sign in with OpenAI,” “Sign in with Anthropic,” or “Sign in with Google,” that flow authenticates with the vendor, not your NexoAI wallet. Choose its API-key or custom-provider mode instead.
A clean troubleshooting order
When a CLI fails, check the configuration in this order:
- The base URL matches the page exactly and has no accidental duplicate
/v1. - The key came from Dashboard → Keys and has no extra quotes or spaces.
- The configured model ID appears in the NexoAI catalog.
- The key has RPM, TPM, and budget headroom.
- The shared wallet has spendable credit.
This order separates local config mistakes from wallet or rate-limit failures quickly.
