The VberAI API is a RESTful HTTP API for embedding VberAI's AI capabilities (today: AI Super Matting) into your apps, games, and automation pipelines. Authentication uses API keys with signature-based requests; common error codes are standardised; per-call billing is paid in VberAI credits.
High-quality cutout that separates a subject from its background and returns a clean matting result. Asynchronous — submit, then poll or await a webhook.
Pricing
Priced by the longest output edge (dimension tiers — e.g. 512 px is 2 credits, 1024 px is 10). Call the /cost endpoint for the exact amount before running a job.
Parameters
Parameter
Type
Required
Description
source_type
string
Yes
One of "url" (input_value is a public http(s) image URL) or "base64" (input_value is a base64 string or data: URL).
input_value
string
Yes
The source image: an http(s) URL when source_type is "url", or base64 image data when source_type is "base64".
width
number
Yes
Target width in pixels (64–2048).
height
number
Yes
Target height in pixels (64–2048).
seed
number
No
Optional. Fixed integer seed for reproducible output; a random seed is used when omitted.
Polling & results
Asynchronous jobs return a taskId. Poll the task until its status is a terminal value, then read the result. The route you poll depends on your key type — this is the single most important thing to get right.
Action
Personal key
Enterprise key
Poll task status
GET /ai/tasks/{taskId}
GET /ai/org-services/tasks/{taskId}
Re-sign fresh download URLs
Read from the status response
GET /ai/org-services/tasks/{taskId}/outputs
Enterprise keys must poll the /ai/org-services route
An enterprise key (vber_org_sk_) sent to a personal /ai/tasks route returns 401 INVALID_API_KEY — the personal routes only accept personal keys. Always poll enterprise jobs at /ai/org-services/tasks/{taskId}. Cancel and batch-status are personal-key only.
A task moves through these values. Stop polling once you reach a terminal status: completed, failed, cancelled or timeout.
When status is completed, result.assets holds the output images. Each asset has a url (a pre-signed download link that expires), a mimeType and an index; width, height, size and expiresAt appear when available. Fetch the URLs promptly — enterprise keys can re-request fresh links from the /outputs endpoint.
When completed, result.assets holds the matting output image(s).
Pass a public HTTPS webhookUrl (and an optional webhookSecret) when you submit the job. Enterprise keys read these from the top level of the body; personal keys read them from options.
If you set a webhookSecret, each delivery includes an X-Webhook-Signature header — an HMAC-SHA256 of the raw JSON payload, hex-encoded. Recompute it with your secret and compare before trusting the payload. Deliveries also carry an X-Idempotency-Key (taskId + status) so you can ignore duplicates.