Tutorials
Coding tutorials
Use this API in coding CLIs, IDE extensions and agents · 4 lessons
1Claude Code
Point Claude Code at this site with environment variables
- Create a token under Console → API Tokens and copy the full key (starts with sk-).
- Set the two environment variables below (add them to ~/.zshrc or ~/.bashrc to keep them).
- Run claude. To pick a model, also set ANTHROPIC_MODEL with a name copied from the Models page.
export ANTHROPIC_BASE_URL=https://17astra.com
export ANTHROPIC_AUTH_TOKEN=sk-your-key
# optional
export ANTHROPIC_MODEL=claude-sonnet-4-6
claudeDo not add /v1 to the base URL: Claude Code appends /v1/messages itself.
2Codex CLI
Add a custom provider in config.toml
- Create a token under Console → API Tokens and copy the full key (starts with sk-).
- Edit ~/.codex/config.toml and add the configuration below.
- Export ASTRA_API_KEY in your shell, then run codex.
model = "gpt-5"
model_provider = "astra"
[model_providers.astra]
name = "Astra-api"
base_url = "https://17astra.com/v1"
env_key = "ASTRA_API_KEY"
wire_api = "responses"export ASTRA_API_KEY=sk-your-key
codex3Gemini CLI
Connect with the native Gemini protocol
- Create a token under Console → API Tokens and copy the full key (starts with sk-).
- Set the variables below and run gemini; use -m to choose a model.
export GOOGLE_GEMINI_BASE_URL=https://17astra.com
export GEMINI_API_KEY=sk-your-key
gemini -m gemini-2.5-pro4Cline / Roo Code (VS Code)
Use the OpenAI Compatible provider
- Create a token under Console → API Tokens and copy the full key (starts with sk-).
- Open the extension settings and choose OpenAI Compatible as the API provider.
- Set Base URL to https://17astra.com/v1 and paste your key.
- Enter the exact model name from the Models page as the Model ID and save.