Forward Claude requests through your own URL using Replit AI credits.
https://claudeaiapi.com
# Set these in your shell or .env: ANTHROPIC_BASE_URL=https://claudeaiapi.com ANTHROPIC_API_KEY=<your API key>
# pip install anthropic import anthropic client = anthropic.Anthropic( base_url="https://claudeaiapi.com", api_key="<your API key>", ) msg = client.messages.create( model="claude-sonnet-4-5", max_tokens=1024, messages=[{"role": "user", "content": "Hello!"}], )
// npm install @anthropic-ai/sdk import Anthropic from "@anthropic-ai/sdk"; const client = new Anthropic({ baseURL: "https://claudeaiapi.com", apiKey: "<your API key>", }); const msg = await client.messages.create({ model: "claude-sonnet-4-5", max_tokens: 1024, messages: [{ role: "user", content: "Hello!" }], });
curl https://claudeaiapi.com/v1/messages \ -H "x-api-key: <your API key>" \ -H "anthropic-version: 2023-06-01" \ -H "content-type: application/json" \ -d '{"model":"claude-haiku-4-5","max_tokens":256,"messages":[{"role":"user","content":"Hi"}]}'