What you'll build
By the end of this guide, you'll have:
- An Izzi API key connected to 38+ AI models
- A working Python script that calls Claude, GPT, and Gemini
- Streaming enabled for real-time responses
- Error handling for production use
Step 1: Create your API key
- Go to izziapi.com and sign in with Google
- Navigate to Dashboard → API Keys
- Click "Create Key" — your key starts with
izzi- - First deposit of $1 gets you +$5 bonus (total $6 credit)
Step 2: Make your first API call
Using curl
Bash
curl -X POST https://api.izziapi.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer izzi-YOUR_KEY_HERE" \
-d '{
"model": "claude-sonnet-4-20250514",
"messages": [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Explain async/await in Python in 3 sentences."}
],
"max_tokens": 500
}'Using Python
Python
from openai import OpenAI
client = OpenAI(
api_key="izzi-YOUR_KEY_HERE",
base_url="https://api.izziapi.com/v1"
)
response = client.chat.completions.create(
model="claude-sonnet-4-20250514",
messages=[
{"role": "system", "content": "You are a senior Python developer."},
{"role": "user", "content": "Write a retry decorator with exponential backoff."}
],
max_tokens=1000,
temperature=0.3
)
print(response.choices[0].message.content)Using Node.js
TypeScript
import OpenAI from "openai";
const client = new OpenAI({
apiKey: "izzi-YOUR_KEY_HERE",
baseURL: "https://api.izziapi.com/v1",
});
const response = await client.chat.completions.create({
model: "claude-sonnet-4-20250514",
messages: [
{ role: "system", content: "You are a senior TypeScript developer." },
{ role: "user", content: "Write a type-safe API client." },
],
max_tokens: 1000,
});
console.log(response.choices[0].message.content);Step 3: Enable streaming
Streaming delivers tokens as they're generated — no waiting for the full response:
Python
stream = client.chat.completions.create(
model="claude-sonnet-4-20250514",
messages=[{"role": "user", "content": "Explain WebSockets vs SSE"}],
stream=True
)
for chunk in stream:
if chunk.choices[0].delta.content:
print(chunk.choices[0].delta.content, end="", flush=True)Step 4: Switch models in one line
The beauty of Izzi API — same code, different model:
Python
# Switch to GPT-5
response = client.chat.completions.create(
model="gpt-5.4", # Just change this line
messages=[{"role": "user", "content": "Hello!"}]
)
# Or try a FREE model
response = client.chat.completions.create(
model="deepseek-r1-0528", # Completely free
messages=[{"role": "user", "content": "Hello!"}]
)Step 5: Add error handling
Python
from openai import OpenAI, RateLimitError, APIConnectionError
import time
client = OpenAI(api_key="izzi-YOUR_KEY_HERE", base_url="https://api.izziapi.com/v1")
def call_with_retry(messages, model="claude-sonnet-4-20250514", max_retries=3):
for attempt in range(max_retries):
try:
return client.chat.completions.create(
model=model,
messages=messages,
max_tokens=2000
)
except RateLimitError:
wait = 2 ** attempt
print(f"Rate limited. Retrying in {wait}s...")
time.sleep(wait)
except APIConnectionError:
print("Connection error. Retrying...")
time.sleep(1)
raise Exception("Max retries exceeded")Pricing at a glance
| Model | Input (per 1M tokens) | Output (per 1M tokens) | Free? |
|---|---|---|---|
| Claude Sonnet 4 | $2.10 | $10.50 | No |
| GPT-5 | $1.75 | $7.00 | No |
| Gemini 2.5 Flash | $0.05 | $0.21 | No |
| DeepSeek R1 0528 | $0 | $0 | ✅ Yes |
| Qwen3 235B | $0 | $0 | ✅ Yes |
| Llama 4 Maverick | $0 | $0 | ✅ Yes |
