Documentation

Quickstart

Clean your first video with the API in three calls.

This guide cleans a video in three calls: upload, create a job, download the result.

1. Create an API key

Open API and webhooks in the dashboard and click Create key. The key starts with pxm_live_ and is shown once. Store it as an environment variable:

export PIXAMAKE_API_KEY="pxm_live_..."

API access requires the Growth or Scale plan.

2. Send the video

If your video is already online, skip to step 3 and use video_url. Otherwise, ask for an upload slot:

curl https://pixamake.ai/v1/uploads \
  -H "Authorization: Bearer $PIXAMAKE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"filename": "ad.mp4", "content_type": "video/mp4", "size_bytes": 4821331}'
{
  "id": "up_7Qm2rT9vXk3LpZ8aWn4c",
  "object": "upload",
  "upload_url": "https://...",
  "method": "PUT",
  "headers": { "Content-Type": "video/mp4" },
  "expires_at": "2026-10-04T13:00:00.000Z"
}

Then send the file bytes to upload_url with the same Content-Type. The size must match size_bytes exactly.

curl -X PUT "$UPLOAD_URL" -H "Content-Type: video/mp4" --data-binary @ad.mp4

3. Create the job

curl https://pixamake.ai/v1/jobs \
  -H "Authorization: Bearer $PIXAMAKE_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"upload_id": "up_7Qm2rT9vXk3LpZ8aWn4c"}'

Or directly from a public URL:

curl https://pixamake.ai/v1/jobs \
  -H "Authorization: Bearer $PIXAMAKE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"video_url": "https://cdn.example.com/ad.mp4"}'

The response is a job with status: "queued" and the credits it reserved.

4. Get the result

Poll the job every 5 to 10 seconds, or configure a webhook:

curl https://pixamake.ai/v1/jobs/job_3kT9xQ2vLm8RfZp1Wq7a \
  -H "Authorization: Bearer $PIXAMAKE_API_KEY"

When status is succeeded, download result.url. The link is valid for one hour; fetch the job again for a fresh link.

Complete example (Node.js)

const BASE = "https://pixamake.ai";
const headers = { Authorization: `Bearer ${process.env.PIXAMAKE_API_KEY}`, "Content-Type": "application/json" };
 
const job = await fetch(`${BASE}/v1/jobs`, {
  method: "POST",
  headers: { ...headers, "Idempotency-Key": crypto.randomUUID() },
  body: JSON.stringify({ video_url: "https://cdn.example.com/ad.mp4" }),
}).then((r) => r.json());
 
let current = job;
while (["queued", "analyzing", "processing"].includes(current.status)) {
  await new Promise((r) => setTimeout(r, 8000));
  current = await fetch(`${BASE}/v1/jobs/${job.id}`, { headers }).then((r) => r.json());
}
console.log(current.status, current.result?.url ?? current.error);

Complete example (Python)

import os, time, uuid, requests
 
BASE = "https://pixamake.ai"
H = {"Authorization": f"Bearer {os.environ['PIXAMAKE_API_KEY']}"}
 
job = requests.post(f"{BASE}/v1/jobs", headers={**H, "Idempotency-Key": str(uuid.uuid4())},
                    json={"video_url": "https://cdn.example.com/ad.mp4"}).json()
while job["status"] in ("queued", "analyzing", "processing"):
    time.sleep(8)
    job = requests.get(f"{BASE}/v1/jobs/{job['id']}", headers=H).json()
print(job["status"], (job.get("result") or {}).get("url"), job.get("error"))