eroq

Media

Remove background

Send a picture, get the subject back with a transparent background.

5 credits per picture

The picture: multipart/form-data with a file part (PNG, JPEG, WebP, up to 30 MB), or JSON { "image": "upload:<id>" | "creation:<id>" } — one of your pictures. No prompt: it keeps the subject (a person, a product, an animal) and returns an RGBA PNG at the picture's own size, its edges soft (hair included). It runs on our own GPUs (eroq Cutout): nothing leaves eroq.

The request holds while the GPU works — a few seconds once it is warm — and answers like GET /v1/images/generations/{id}. A cold GPU can take longer: past ~70 s the call answers 202 with the job id and poll (GET /v1/images/generations/{id}), already billed and refunded if it fails. The cutout lands in your creation library (library_id, a folder_id part or field files it); private: true keeps nothing and returns it inline, once.

tools["remove-background"] on GET /v1/engines says whether it is live on this deployment (else 503 model_unavailable, nothing billed).

Autorização

Authorizationstringheaderobrigatório

Sua chave de API como bearer token: Bearer eroq_sk_…. Crie uma na página de chaves.

POST/v1/images/remove-background

Corpo

application/json
filefile

The picture (multipart). Or send image instead.

imagestring

A picture of yours: upload:<id> (Storage) or creation:<id> (Creations).

folder_idstring

Library folder the cutout lands in — one of yours.

privateboolean

Keep nothing: the PNG comes back inline (b64_json), once.

Send a picture, get the subject back with a transparent background
curl https://eroq.ai/v1/images/remove-background \
  -H "Authorization: Bearer $EROQ_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "image": "creation:3f1c2b9a-…"
}'
{
  "id": "5d0b1e4a-…",
  "object": "image.generation",
  "created": 1763740800,
  "model": "eroq-cutout",
  "status": "succeeded",
  "generation_ms": 6100,
  "data": [{ "url": "https://cdn.eroq.ai/…/image.png?token=…&expires=…", "content_type": "image/png", "library_id": "…" }],
  "usage": { "credits_spent": 5, "credits_remaining": 977 }
}