Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Use Claude models through the Nolma gateway
import anthropic client = anthropic.Anthropic( api_key=os.environ["ANTHROPIC_API_KEY"], base_url="https://gateway.nolma.ai/anthropic", default_headers={ "NM-Key": "nm_live_abc123", "NM-Agent": "my-agent", # Optional: "NM-User": "user_123", "NM-Env": "production", } )
with client.messages.stream( model="claude-haiku-4-5-20251001", max_tokens=500, messages=[{"role": "user", "content": "Tell me a story"}] ) as stream: for text in stream.text_stream: print(text, end="", flush=True)
import Anthropic from '@anthropic-ai/sdk' const client = new Anthropic({ apiKey: process.env.ANTHROPIC_API_KEY, baseURL: 'https://gateway.nolma.ai/anthropic', defaultHeaders: { 'NM-Key': 'nm_live_abc123', 'NM-Agent': 'my-agent', } })
anthropic-version