Lunos logoLunos

Integration: Claude Code with Lunos

This guide explains how to use Claude Code with Lunos so you can run coding workflows with models available in your Lunos account.

You can start with coding-focused models such as Qwen, DeepSeek, Gemma, or GPT-family models depending on availability in your workspace.

Prerequisites

  • Claude Code installed on your machine
  • Lunos API key
  • A model ID available on your Lunos account

Claude Code setup

Install Claude Code first, then point it to Lunos through environment variables.

macOS / Linux

curl -fsSL https://claude.ai/install.sh | bash

Set environment variables in the same terminal session:

export ANTHROPIC_BASE_URL="https://api.lunos.tech"
export ANTHROPIC_API_KEY="your-lunos-api-key"

To persist for new terminals, add those export lines to your shell profile:

  • ~/.zshrc for zsh
  • ~/.bashrc for bash

Windows (PowerShell)

irm https://claude.ai/install.ps1 | iex

Set variables for the current PowerShell session:

$env:ANTHROPIC_BASE_URL = "https://api.lunos.tech"
$env:ANTHROPIC_API_KEY  = "your-lunos-api-key"

To persist across sessions, use setx:

setx ANTHROPIC_BASE_URL "https://api.lunos.tech"
setx ANTHROPIC_API_KEY "your-lunos-api-key"

Run Claude Code with Lunos

From your project directory:

claude --model openai/gpt-4o

Example with another model ID:

claude --model deepseek/deepseek-chat

Use a model ID that exists in your Lunos model list.

  • Use faster models for quick edits and iteration.
  • Use stronger reasoning models for larger refactors.
  • Keep each prompt focused on one task at a time.
  • Pin model IDs in scripts to keep behavior stable across teams.

Troubleshooting

Connection errors

  • Check that ANTHROPIC_BASE_URL is set correctly.
  • Confirm your network can reach https://api.lunos.tech.
  • Verify the API key is valid and active.

Wrong model or model not found

  • Run with a model ID that exists in your Lunos dashboard.
  • If a model is deprecated, switch to an active replacement.

Claude Code asks for onboarding/login repeatedly

  • Complete first-run setup in Claude Code.
  • If your environment is managed, ensure credentials are available in the same shell where claude runs.

IDE extension

You can also use Claude Code inside your editor:

Security

  • Never commit API keys into repositories.
  • Use environment variables or secure credential managers.
  • Scope keys per environment when possible (dev/staging/prod).