Getting Started
The Drawever API allows you to integrate our AI image processing tools into your applications. Get started by creating an API key and making your first request.
Base URL
https://www.drawever.com/apiAuthentication
All API requests require authentication using an API key in the Authorization header:
curl -H "Authorization: Bearer YOUR_API_KEY" https://www.drawever.com/api/toolsHow Credits Work
API requests consume credits from your account balance — the same credits used on the website. Each tool costs a different number of credits depending on processing complexity. Your remaining balance is returned in every response header as X-Credits-Remaining.
Available Endpoints
/toolsList all available AI tools and their credit costs.
curl -H "Authorization: Bearer YOUR_API_KEY" https://www.drawever.com/api/tools/tools/queueCreate a processing job for a specific tool. Returns a queueId that you use to poll for progress and results.
curl -X POST https://www.drawever.com/api/tools/queue \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"tool": "/ai/photo-to-anime",
"payload": {
"image": "data:image/jpeg;base64,/9j/4AAQ...",
"style": "anime_v2"
}
}'/tools/queue?id={queueId}Poll the status of a queued job. Returns progress percentage and the result URL once processing is complete.
curl -H "Authorization: Bearer YOUR_API_KEY" https://www.drawever.com/api/tools/queue?id=abc123/usageGet your API usage statistics including credits remaining, requests made, and processing history.
curl -H "Authorization: Bearer YOUR_API_KEY" https://www.drawever.com/api/usage/creditsCheck your current credit balance.
curl -H "Authorization: Bearer YOUR_API_KEY" https://www.drawever.com/api/creditsResponse Format
All API responses follow a consistent JSON format:
Success Response
{
"success": true,
"data": {
"resultURL": "https://cdn.drawever.com/result.jpg",
"credits": 5,
"creditsRemaining": 45,
"duration": 3.2
},
"message": "Image processed successfully"
}Error Response
{
"success": false,
"error": {
"code": "INSUFFICIENT_CREDITS",
"message": "You need 5 credits but only have 2 remaining."
}
}Error Codes
The API uses standard HTTP status codes. Here are the ones you'll encounter most often:
| Code | Meaning | What to Do |
|---|---|---|
| 400 | Bad Request | Check your request body — a required field is missing or malformed. |
| 401 | Unauthorized | Your API key is missing or invalid. Double-check the Authorization header. |
| 402 | Insufficient Credits | Buy more credits at drawever.com/checkout. |
| 404 | Not Found | The endpoint or tool name doesn't exist. Check spelling. |
| 429 | Rate Limited | You've hit the rate limit. Wait a moment and retry. |
| 500 | Server Error | Something went wrong on our end. Retry after a few seconds. |
| 503 | Service Unavailable | The processing queue is full. Retry with exponential backoff. |
Webhooks
Coming SoonSome tools take longer to process (image generation, upscaling at 4x). Instead of polling the queue endpoint, you'll be able to register a webhook URL and we'll POST the result to you when it's ready.
Webhook support is on our roadmap. If this is important for your integration, let us know — it helps us prioritize.
Code Examples
Python
import requests
API_KEY = "your_api_key_here"
BASE_URL = "https://www.drawever.com/api"
# Convert a photo to anime style
with open("photo.jpg", "rb") as f:
import base64
image_b64 = base64.b64encode(f.read()).decode()
# Create a queue job
response = requests.post(
f"{BASE_URL}/tools/queue",
headers={"Authorization": f"Bearer {API_KEY}"},
json={
"tool": "/ai/photo-to-anime",
"payload": {
"image": f"data:image/jpeg;base64,{image_b64}",
"style": "anime_v2"
}
}
)
queue_id = response.json()["data"]["queueId"]
# Poll for results
import time
while True:
status = requests.get(
f"{BASE_URL}/tools/queue?id={queue_id}",
headers={"Authorization": f"Bearer {API_KEY}"}
).json()
if status["data"]["status"] == "completed":
print(status["data"]["resultURL"])
break
time.sleep(2)JavaScript (Node.js)
const fs = require('fs');
const API_KEY = 'your_api_key_here';
const BASE_URL = 'https://www.drawever.com/api';
// Convert a photo to anime style
const imageBuffer = fs.readFileSync('photo.jpg');
const imageB64 = imageBuffer.toString('base64');
// Create a queue job
const response = await fetch(`${BASE_URL}/tools/queue`, {
method: 'POST',
headers: {
'Authorization': `Bearer ${API_KEY}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
tool: '/ai/photo-to-anime',
payload: {
image: `data:image/jpeg;base64,${imageB64}`,
style: 'anime_v2'
}
})
});
const { data } = await response.json();
const queueId = data.queueId;
// Poll for results
while (true) {
const status = await fetch(
`${BASE_URL}/tools/queue?id=${queueId}`,
{ headers: { 'Authorization': `Bearer ${API_KEY}` } }
).then(r => r.json());
if (status.data.status === 'completed') {
console.log(status.data.resultURL);
break;
}
await new Promise(r => setTimeout(r, 2000));
}cURL — Upload a File
# Remove background from an image
curl -X POST https://www.drawever.com/api/tools/queue \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"tool": "/ai/background-remover",
"payload": {
"image": "data:image/png;base64,'$(base64 -i photo.png)'"
}
}'