Skip to content

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

ToolRequest shapeNexoAI setup
Claude CodeAnthropic-compatiblePut ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN in settings.json.
CodexOpenAI ResponsesAdd the nexoai provider to config.toml and the key to auth.json.
Gemini CLIGemini-nativeRead the compatibility note before configuring; the Gemini model is available through NexoAI's OpenAI shape.
Cline, Aider, Continue, and othersOpenAI-compatibleSelect 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:

  1. The base URL matches the page exactly and has no accidental duplicate /v1.
  2. The key came from Dashboard → Keys and has no extra quotes or spaces.
  3. The configured model ID appears in the NexoAI catalog.
  4. The key has RPM, TPM, and budget headroom.
  5. The shared wallet has spendable credit.

This order separates local config mistakes from wallet or rate-limit failures quickly.

Built for developers across MENA.