API documentation
Beta documentation for developers.
[!WARNING] This documentation is for Beta Dev Only.
Woozlit Developer API Documentation
Welcome to the Woozlit Developer API! This API allows you to use Woozlit's AI models in your own applications, IDEs, and workflows.
Getting Started
1. Get Developer Access
To use the Woozlit API, you need developer access:
- Log in to your Woozlit account
- Contact an administrator to request developer access
- Once approved, you'll see the "Developer" badge on your account
2. Create an API Key
- Go to Settings > Account in Woozlit
- Scroll to the Developer API Keys section
- Click Create Key
- Give your key a descriptive name (e.g., "Production Server", "VS Code Extension")
- Copy the key immediately - you won't be able to see it again!
Important: Store your API key securely. Anyone with access to it can use your account's token quota.
API Endpoint
POST https://woozlit.com/api/woozlit/v1/chat/completionsThe Woozlit API is compatible with the OpenAI Chat Completions API format, making it easy to integrate with existing tools and libraries.
Authentication
Include your API key in the Authorization header:
Authorization: Bearer woozlit_YOUR_API_KEY_HEREAvailable Models
All Woozlit models are available via the API with the woozlit/ prefix:
OpenAI Models
woozlit/gpt-4owoozlit/gpt-4o-miniwoozlit/gpt-4-turbowoozlit/gpt-3.5-turbo
Anthropic Models
woozlit/claude-3-5-sonnet-20241022woozlit/claude-3-5-haiku-20241022woozlit/claude-3-opus-20240229
Google Models
woozlit/gemini-2.0-flash-expwoozlit/gemini-1.5-prowoozlit/gemini-1.5-flash
DeepSeek Models
woozlit/deepseek-chatwoozlit/deepseek-reasoner
Request Format
{
"model": "woozlit/gpt-4o-mini",
"messages": [
{
"role": "system",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": "Hello, how are you?"
}
],
"stream": true,
"temperature": 0.7,
"max_tokens": 1000
}Parameters
model(required): The model to use (must includewoozlit/prefix)messages(required): Array of message objects withroleandcontentstream(optional): Enable streaming responses (default:true)temperature(optional): Controls randomness (0-2, default: 0.7)max_tokens(optional): Maximum tokens in responsetop_p(optional): Nucleus sampling parameterfrequency_penalty(optional): Penalize repeated tokenspresence_penalty(optional): Penalize tokens based on presence
Response Format
Streaming Response
When stream: true, the API returns Server-Sent Events (SSE):
data: {"id":"woozlit-123","object":"chat.completion.chunk","created":1234567890,"model":"woozlit/gpt-4o-mini","choices":[{"index":0,"delta":{"content":"Hello"},"finish_reason":null}]}
data: {"id":"woozlit-123","object":"chat.completion.chunk","created":1234567890,"model":"woozlit/gpt-4o-mini","choices":[{"index":0,"delta":{"content":"!"},"finish_reason":"stop"}]}Non-Streaming Response
When stream: false:
{
"id": "woozlit-1234567890",
"object": "chat.completion",
"created": 1234567890,
"model": "woozlit/gpt-4o-mini",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Hello! I'm doing well, thank you for asking."
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 15,
"completion_tokens": 12,
"total_tokens": 27
}
}Code Examples
cURL
curl https://woozlit.com/api/woozlit/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer woozlit_YOUR_API_KEY_HERE" \
-d '{
"model": "woozlit/gpt-4o-mini",
"messages": [
{"role": "user", "content": "Hello!"}
]
}'Python
import requests
API_KEY = "woozlit_YOUR_API_KEY_HERE"
API_URL = "https://woozlit.com/api/woozlit/v1/chat/completions"
headers = {
"Authorization": f"Bearer {API_KEY}",
"Content-Type": "application/json"
}
data = {
"model": "woozlit/gpt-4o-mini",
"messages": [
{"role": "user", "content": "Hello!"}
],
"stream": False
}
response = requests.post(API_URL, headers=headers, json=data)
result = response.json()
print(result["choices"][0]["message"]["content"])Python with Streaming
import requests
import json
API_KEY = "woozlit_YOUR_API_KEY_HERE"
API_URL = "https://woozlit.com/api/woozlit/v1/chat/completions"
headers = {
"Authorization": f"Bearer {API_KEY}",
"Content-Type": "application/json"
}
data = {
"model": "woozlit/gpt-4o-mini",
"messages": [
{"role": "user", "content": "Write a short poem"}
],
"stream": True
}
response = requests.post(API_URL, headers=headers, json=data, stream=True)
for line in response.iter_lines():
if line:
line = line.decode("utf-8")
if line.startswith("data: "):
json_str = line[6:]
if json_str.strip() != "[DONE]":
try:
chunk = json.loads(json_str)
content = chunk["choices"][0]["delta"].get("content", "")
print(content, end="", flush=True)
except json.JSONDecodeError:
passNode.js
const fetch = require("node-fetch");
const API_KEY = "woozlit_YOUR_API_KEY_HERE";
const API_URL = "https://woozlit.com/api/woozlit/v1/chat/completions";
async function chat() {
const response = await fetch(API_URL, {
method: "POST",
headers: {
Authorization: `Bearer ${API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
model: "woozlit/gpt-4o-mini",
messages: [{ role: "user", content: "Hello!" }],
stream: false,
}),
});
const data = await response.json();
console.log(data.choices[0].message.content);
}
chat();Using with OpenAI SDK
The Woozlit API is compatible with the OpenAI SDK:
from openai import OpenAI
client = OpenAI(
api_key="woozlit_YOUR_API_KEY_HERE",
base_url="https://woozlit.com/api/woozlit/v1"
)
response = client.chat.completions.create(
model="woozlit/gpt-4o-mini",
messages=[
{"role": "user", "content": "Hello!"}
]
)
print(response.choices[0].message.content)Usage Limits
- Free Users: 1,000,000 tokens per month
- Premium Users: Unlimited tokens
- Token usage from the API counts toward your monthly quota
- If you exceed your limit, the API will return a
429 Too Many Requestserror
Rate Limiting
To prevent abuse, the API implements rate limiting:
- Usage is tracked per API key
- If limits are exceeded, you'll receive a 429 error
- Contact support if you need higher limits
Error Handling
Common Error Codes
401 Unauthorized: Invalid or missing API key403 Forbidden: Account disabled or developer access revoked429 Too Many Requests: Monthly token limit exceeded400 Bad Request: Invalid request format or parameters500 Internal Server Error: Server error (contact support if persistent)
Error Response Format
{
"error": "Monthly token limit exceeded. Your usage will reset next month."
}Best Practices
- Store API keys securely: Never commit keys to version control
- Use environment variables: Store keys in
.envfiles - Monitor usage: Check your usage in the Woozlit dashboard
- Handle errors gracefully: Implement retry logic with exponential backoff
- Use streaming for long responses: Better user experience and timeout prevention
- Set appropriate timeouts: Prevent hanging requests
- Rotate keys regularly: For enhanced security
Support
- Documentation: https://woozlit.com/docs
- Dashboard: https://woozlit.com/settings
- Issues: Contact support through the Woozlit app
Changelog
Version 1.0.0 (December 2025)
- Initial release of Woozlit Developer API
- Support for all major AI model providers
- OpenAI-compatible API format
- Streaming and non-streaming responses
- Token usage tracking
Happy Building!