Getting Started
One API key for governed routing across the current Aweb provider warehouse: 245 provider surfaces, 506 MCP tools, and 374 API capabilities from the live catalog source of truth.
1. Get your API key
Start from the public Aweb demo at aweblabs.ai and create an API key from your dashboard. Keys use the sk-aweb- prefix.
export AWEB_API_KEY="sk-aweb-your_key_here"2. Install the SDK
Install the official Aweb TypeScript SDK via npm, yarn, or pnpm.
npm install @aweb/sdk3. Make your first call
Call any capability — Aweb automatically selects the best provider, handles failover, and optimizes for quality and cost.
import Aweb from '@aweb/sdk';
const aweb = new Aweb({ apiKey: process.env.AWEB_API_KEY });
// Chat completion — routed to the best LLM automatically
const chat = await aweb.chat.completions.create({
messages: [{ role: 'user', content: 'Explain quantum computing in one paragraph.' }],
});
console.log(chat.data.choices[0].message.content);
// Text-to-speech — routed to the best TTS provider
const speech = await aweb.audio.speech({
text: 'Hello from Aweb!',
voice: 'alloy',
});
console.log(speech.meta.request_id);4. Or use the REST API directly
No SDK needed. Aweb exposes selected OpenAI-compatible routes plus Aweb-native lifecycle, discovery, and orchestration routes over the public V2 API.
export AWEB_API_BASE_URL="https://aweblabs.ai/api/v2"
curl -X POST "$AWEB_API_BASE_URL/chat/completions" \
-H "Authorization: Bearer $AWEB_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"messages": [
{ "role": "user", "content": "Explain quantum computing in one paragraph." }
]
}'5. Or use the CLI
Install the Aweb CLI for agent and operator workflows from your terminal. The higher-level commands route through warehouse/direct mode, while aweb api ... gives you the lower-level authenticated /api/v2 contract directly.
npm install -g @aweb/cli
aweb login
aweb doctor
aweb chat "Explain quantum computing in one paragraph."
aweb image "A sunset over mountains"
aweb tts "Hello from Aweb"
# Direct V2 contract utilities
aweb api health
aweb api chat "Summarize launch risks"
# Canonical lifecycle commands stay top-level
aweb batch list --jsonLocal warehouse/direct mode can be pointed at a dev app when you are running a local warehouse process. Public/authenticated V2 routes should use AWEB_API_URL. Browser login can be overridden separately with AWEB_CLI_AUTH_URL.
Next steps
- API Reference — full endpoint documentation (OpenAI-compatible)
- TypeScript SDK — type-safe client with auto-completion
- CLI Reference — 30+ commands for AI from the terminal
- Browse providers — inspect the current live provider catalog
- Browse capabilities — explore the current capability graph and domains