API Documentation
Learn how to use the API and supported models.
woozlit api gives you access to our ai models using a simple and developer friendly format (kind of) ;) good luck :-)
Authentication
Every request must include your API key in the Authorization header.
Authorization: Bearer wk_your_token_hereChat Completions
Send a POST request to interact with the models.
Base Endpoint
https://api.woozlit.com/v1/chat/completionsRequest Parameters
model
The model ID you want to use.
messages
An array of messages with roles and content.
max_tokens
Optional limit for the response length.
Examples:
Example using python
import requests
response = requests.post(
"https://api.woozlit.com/v1/chat/completions",
headers={
"Authorization": "Bearer wk_...",
"Content-Type": "application/json"
},
json={
"model": "...",
"messages": [
{
"role": "user",
"content": "Write a Python function to calculate Fibonacci."
}
]
}
)
print(response.json())Example using js
const response = await fetch("https://api.woozlit.com/v1/chat/completions", {
method: "POST",
headers: {
Authorization: "Bearer wk_...",
"Content-Type": "application/json",
},
body: JSON.stringify({
model: "...",
messages: [
{
role: "user",
content: "Write a JavaScript function to calculate Fibonacci.",
},
],
}),
});
const data = await response.json();
console.log(data);Example using curl
curl https://api.woozlit.com/v1/chat/completions \
-H "Authorization: Bearer wk_..." \
-H "Content-Type: application/json" \
-d '{
"model":"...",
"messages":[
{"role":"user","content":"hello"}
],
"max_tokens":128
}'Notes
- u can only get an API key by DMing the admins.
- make sure your API key is valid before sending requests.
- the API is designed to be simple and easy to integrate with your apps and tools.
- Supported models may vary depending on your account access.