Getting Started

Quickstart

Hit the API in under a minute. No credit card required during the public beta.

1. Install an SDK

We have official SDKs for Node, React, and Python. You can also use any HTTP client.

npm i @useknockout/node

import { Knockout } from "@useknockout/node";
const client = new Knockout({ token: process.env.KNOCKOUT_TOKEN });

const png = await client.remove({ file: "./input.jpg" });
await png.writeFile("out.png");

2. Authenticate

Every request needs a token in the Authorization header. Get one by requesting beta access on GitHub — it's free during beta.

Never ship a token in client-side code. Use a server route or proxy.

3. Handle errors

Errors return a structured JSON body with a stable code, a human message, and a request_id for support.

{
  "error": {
    "code": "rate_limit_exceeded",
    "message": "60 req/min limit hit. Retry in 23s.",
    "request_id": "req_01HK..."
  }
}

4. Rate limits

Free tier: 60 req/min, 50 images/month. Paid tier: 600 req/min, no monthly cap. The response always includes x-ratelimit-limit and x-ratelimit-remaining.

5. Self-host (optional)

The whole stack — API, model weights, infra config — is MIT licensed. Run it on your Modal account in four commands:

git clone https://github.com/useknockout/api
cd api
modal deploy app.py
echo "Your endpoint: $(modal app list | grep useknockout)"