quick start guide
Beta documentation for developers.
[!WARNING] This documentation is for Beta Dev Only.
Quick Start Guide - Woozlit Developer API
Create Your First API Key
-
Navigate to Settings
- Click your profile icon
- Go to "Settings" → "Account"
-
Create API Key
- Scroll to "Developer API Keys" section
- Click "Create Key"
- Enter a descriptive name (e.g., "My App", "Production Server")
- Click "Create Key"
-
Copy Your Key
- Important: Copy the key immediately!
- You won't be able to see the full key again
- Store it securely (use environment variables, not in code)
Test Your API Key
# Replace YOUR_API_KEY with your actual key
curl https://woozlit.com/api/woozlit/v1/chat/completions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "woozlit/gpt-4o-mini",
"messages": [
{"role": "user", "content": "Say hello!"}
],
"stream": false
}'Use in Your Application
Python Example
import os
import requests
# Store your API key in environment variables
API_KEY = os.getenv("WOOZLIT_API_KEY")
API_URL = "https://woozlit.com/api/woozlit/v1/chat/completions"
def chat(message: str) -> str:
response = requests.post(
API_URL,
headers={
"Authorization": f"Bearer {API_KEY}",
"Content-Type": "application/json"
},
json={
"model": "woozlit/gpt-4o-mini",
"messages": [{"role": "user", "content": message}],
"stream": False
}
)
if response.status_code == 200:
return response.json()["choices"][0]["message"]["content"]
else:
raise Exception(f"API Error: {response.json()}")
# Usage
print(chat("What is 2+2?"))Node.js Example
const WOOZLIT_API_KEY = process.env.WOOZLIT_API_KEY;
async function chat(message) {
const response = await fetch('https://woozlit.com/api/woozlit/v1/chat/completions', {
method: 'POST',
headers: {
'Authorization': `Bearer ${WOOZLIT_API_KEY}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
model: 'woozlit/gpt-4o-mini',
messages: [{ role: 'user', content: message }],
stream: false
})
});
const data = await response.json();
return data.choices[0].message.content;
}
// Usage
chat('What is 2+2?').then(console.log);Using OpenAI SDK (Recommended)
from openai import OpenAI
# Initialize with Woozlit endpoint
client = OpenAI(
api_key="YOUR_WOOZLIT_API_KEY",
base_url="https://woozlit.com/api/woozlit/v1"
)
# Use exactly like OpenAI
response = client.chat.completions.create(
model="woozlit/gpt-4o-mini",
messages=[
{"role": "user", "content": "Hello!"}
]
)
print(response.choices[0].message.content)Available Models
OpenAI
woozlit/gpt-4o- Most capablewoozlit/gpt-4o-mini- Fast and affordable ⭐ Recommendedwoozlit/gpt-4-turbo- Previous generationwoozlit/gpt-3.5-turbo- Legacy model
Anthropic
woozlit/claude-3-5-sonnet-20241022- Best reasoningwoozlit/claude-3-5-haiku-20241022- Fast responseswoozlit/claude-3-opus-20240229- Powerful
woozlit/gemini-2.0-flash-exp- Experimentalwoozlit/gemini-1.5-pro- Advancedwoozlit/gemini-1.5-flash- Fast
DeepSeek
woozlit/deepseek-chat- General chatwoozlit/deepseek-reasoner- Enhanced reasoning
Usage Limits
- Regular Users: 1,000,000 tokens/month
- Premium Users: Unlimited tokens
- Check your usage at: Settings → Account → Usage Analytics
Common Issues
"Invalid API key"
- Make sure you copied the full key (starts with
woozlit_) - Check that the key hasn't been deleted
- Verify the Authorization header format:
Bearer YOUR_KEY
"Developer access required"
- Contact your administrator to enable developer access
- Admins automatically have developer access
"Monthly token limit exceeded"
- Wait for the next month (usage resets monthly)
- Upgrade to Premium for unlimited tokens
- Check your usage in Settings
"Account disabled"
- Your account has been disabled by an administrator
- Contact support for assistance
Best Practices
-
Never commit API keys to Git
# Add to .gitignore .env .env.local *.key -
Use environment variables
# .env file WOOZLIT_API_KEY=woozlit_your_key_here -
Rotate keys regularly
- Create new keys every few months
- Delete old keys you're no longer using
-
Monitor usage
- Check Settings → Account regularly
- Set up alerts when approaching limits
-
Handle errors gracefully
- Implement retry logic with exponential backoff
- Handle 429 (rate limit) and 401 (auth) errors
Getting Help
- Documentation:
/docs/api-documentation.md - Dashboard: Settings → Account
- Admin Panel:
/admin(admins only)
Examples Repository
Check out example integrations:
- VS Code Extension
- Python CLI Tool
- Node.js Server
- Chrome Extension
Happy coding! 🚀