API Documentation

Integrate Drawever's AI image processing into your applications

Beta — This API Is Not Stable Yet

The Drawever API is currently in beta. Endpoints, request formats, and rate limits may change without notice as we iterate based on developer feedback. We recommend against using it in production-critical workflows until we announce a stable release. That said, we'd love for you to try it out and let us know what you think.

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/api

Authentication

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/tools

How 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

GET/tools

List all available AI tools and their credit costs.

curl -H "Authorization: Bearer YOUR_API_KEY" https://www.drawever.com/api/tools
POST/tools/queue

Create 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"
    }
  }'
GET/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
GET/usage

Get 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
GET/credits

Check your current credit balance.

curl -H "Authorization: Bearer YOUR_API_KEY" https://www.drawever.com/api/credits

Response 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:

CodeMeaningWhat to Do
400Bad RequestCheck your request body — a required field is missing or malformed.
401UnauthorizedYour API key is missing or invalid. Double-check the Authorization header.
402Insufficient CreditsBuy more credits at drawever.com/checkout.
404Not FoundThe endpoint or tool name doesn't exist. Check spelling.
429Rate LimitedYou've hit the rate limit. Wait a moment and retry.
500Server ErrorSomething went wrong on our end. Retry after a few seconds.
503Service UnavailableThe processing queue is full. Retry with exponential backoff.

Webhooks

Coming Soon

Some 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)'"
    }
  }'

Common Questions