Get started

Connect an AI provider

Connect Claude, Codex, Z.ai or a custom endpoint with the local CLI, an API key or a server address, then send a test message.

All pages

Connect one provider and check that it answers. About 2 minutes.

Before you start

Spark runs your installed CLIs: npm i -g @anthropic-ai/claude-code for claude, npm i -g @openai/codex for codex.

Provider Needs CLI Connects with
Claude claude Local CLI or API key
Codex codex Local CLI or API key
Z.ai (GLM) claude API key only
Custom endpoint claude Server address

Z.ai bills its own key, never your Claude account. For a custom endpoint, follow its steps instead of the ones below.

Connect

  1. Select the provider's tile. If it says CLI not installed, select Run it.

    The AI providers tiles with Claude and Jev connected

  2. Under How to connect, pick Local CLI and select Detect and verify.

  3. Or pick API key, paste the key and select Verify key.

  4. Wait for Connected, then Send test message under Test.

  5. Under Defaults for new chats, pick the Model, Mode and Effort.

The Claude screen on the Connect your AI providers step, with the API key tab open

A Local CLI sign-in stays in the CLI. An API key goes to your system keychain, never to Spark's database or logs.

Important: Paste keys only into the key field, never into a chat. See Keep keys out of chats.

If it fails, see Providers and keys.