Endpoint único, autenticação por API key, resposta em PNG com canal alfa. Tudo em HTTPS.
Free
100 /mês
chamadas gratuitas
Premium
1.000 /mês
incluído em qualquer plano pago
Equipe
10.000 /mês
quota compartilhada
Entre na sua conta, abra o Dashboard, clique em "Gerar" na seção "API keys". Copie o token agora — ele só é mostrado uma vez.
POST https://api.removebg.com.br/api/remove-bg
X-API-Key: rbg_suachaveaqui
Content-Type: multipart/form-data
| Campo | Tipo | Descrição |
|---|---|---|
| file | Arquivo | JPG, PNG ou WebP. Até 10 MB. |
| hd | Boolean (opcional) | true para preservar resolução original. Free manda sempre em standard. |
curl -X POST https://api.removebg.com.br/api/remove-bg \
-H "X-API-Key: rbg_suachaveaqui" \
-F "file=@foto.jpg" \
-F "hd=true" \
-o saida.pngimport requests
with open('foto.jpg', 'rb') as f:
res = requests.post(
'https://api.removebg.com.br/api/remove-bg',
headers={'X-API-Key': 'rbg_suachaveaqui'},
files={'file': f},
data={'hd': 'true'},
)
with open('saida.png', 'wb') as out:
out.write(res.content)
print('Quota restante:', res.headers.get('X-Api-Quota-Remaining'))import fs from 'node:fs';
const form = new FormData();
form.append('file', new Blob([fs.readFileSync('foto.jpg')]), 'foto.jpg');
form.append('hd', 'true');
const res = await fetch('https://api.removebg.com.br/api/remove-bg', {
method: 'POST',
headers: { 'X-API-Key': 'rbg_suachaveaqui' },
body: form,
});
const buf = Buffer.from(await res.arrayBuffer());
fs.writeFileSync('saida.png', buf);| Status | Code | Quando |
|---|---|---|
| 401 | BAD_API_KEY | Chave inválida ou revogada. |
| 413 | TOO_LARGE | Arquivo maior que 10 MB. |
| 415 | BAD_TYPE | Formato não suportado. |
| 429 | API_QUOTA_EXCEEDED | Quota mensal da chave esgotada. |
| 500 | PROCESSING_ERROR | Falha no servidor (retry em 5s). |
| X-Api-Quota-Remaining | Quantas chamadas ainda restam no mês para essa chave. |
| Content-Disposition | Nome sugerido do arquivo (PNG). |
Planos Enterprise com SLA e volume customizado. Fale com a gente.