Inference API reference
Everything you need to call the chat, embeddings, and image generation endpoints.
Authentication
Authenticate every request with a bearer API key in the Authorization header. Keys are secret — the raw value is shown only once, when you create or rotate a key.
Create and manage keys under Settings → API Keys.
Authorization: Bearer wba_live_xxxxxxxxxxxxxxxxxxxxxxxxBase URL: https://api.webanto.com/api/v1
How a request flows
Every endpoint follows the same path — authenticate, check the key's scope, run inference, and return the result with its credit cost.
Your server
Send the request from your backend. API keys must never ship to a browser or client bundle.Bearer auth
The gateway reads your key from the Authorization header and identifies your organization.Scope check
The key's scopes (chat, embeddings, images) are matched against the endpoint before any work happens.Model inference
The request runs on the model you named — qwen, nomic-embed-text, dinov3, flux.2-dev, or birefnet-general.Response + credits
You get the JSON result (or PNG for remove-background) and the credit cost is deducted from your org balance.
Models
Five models across three scopes. Chat is multimodal; embeddings cover text and images; images are generated from text.
| Model | Endpoint | Kind | Scope |
|---|---|---|---|
| qwen | /api/v1/chat | Chat — multimodal (text + vision) | chat |
| nomic-embed-text | /api/v1/embeddings | Text embeddings | embeddings |
| clip | /api/v1/embeddings | Text + image embeddings — 512-d, shared space (cross-modal) | embeddings |
| dinov3 | /api/v1/image-embeddings | Image embeddings — 1280-d, L2-normalized | embeddings |
| flux.2-dev | /api/v1/images | Image generation — FLUX.2-dev text-to-image | images |
| birefnet-general | /api/v1/images/remove-background | Background removal — BiRefNet cutout, transparent PNG out | images |
Text embeddings
Generate text embeddings with nomic-embed-text or clip. Requires a key scoped for embeddings.
POST /api/v1/embeddings
- model
- The embeddings model to use: "nomic-embed-text" or "clip".
- input
- A single string or an array of up to 100 strings to embed.
Request
curl https://api.webanto.com/api/v1/embeddings \
-H "Authorization: Bearer $WEBANTO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "nomic-embed-text",
"input": ["a photo of a cat", "a photo of a dog"]
}'Response
{
"model": "nomic-embed-text",
"data": [
{ "index": 0, "embedding": [0.0123, -0.0456, "..."] },
{ "index": 1, "embedding": [0.0789, -0.0012, "..."] }
],
"usage": { "total_tokens": 14 },
"credits": 1
}Image embeddings
Embed images with DINOv3 (1280-dimensional, L2-normalized). Send urls or images (not both), up to 60 per batch; URLs must be https. Requires a key scoped for embeddings.
POST /api/v1/image-embeddings
- urls
- An array of up to 60 https image URLs to embed. Provide urls or images, not both.
- images
- An array of up to 60 base64-encoded image objects with a b64 field. Provide images or urls, not both.
Request
curl https://api.webanto.com/api/v1/image-embeddings \
-H "Authorization: Bearer $WEBANTO_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "urls": ["https://cdn.example.com/card.jpg"] }'Response
{
"model": "dinov3",
"dim": 1280,
"embeddings": [[0.009, -0.002, "..."]],
"errors": [],
"credits": 1
}Image generation
Generate images from a text prompt with FLUX.2-dev, self-hosted on dedicated GPU hardware. Returns base64-encoded PNGs. Requires a key scoped for images.
POST /api/v1/images
- prompt
- The text description of the image to generate (required, up to 4000 characters).
- size
- Output dimensions — one of 512x512, 768x768, 1024x1024, 1024x1536, or 1536x1024. Defaults to 1024x1024.
- n
- Number of images to generate, 1–4. Each image is charged separately. Defaults to 1.
Request
curl https://api.webanto.com/api/v1/images \
-H "Authorization: Bearer $WEBANTO_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "model": "flux.2-dev", "prompt": "a red maple leaf on a white background, studio product photo", "size": "1024x1024" }'Response
{
"created": 1730000000,
"model": "flux.2-dev",
"data": [{ "b64_json": "iVBORw0KGgo..." }],
"credits": 1
}Background removal
Strips the background from a product photo and returns a transparent PNG. Unlike the other endpoints this one is binary in, binary out — POST the raw image bytes with an image/* Content-Type and the cutout comes back as the response body. Credits are reported in the X-Webanto-Credits header.
POST /api/v1/images/remove-background
Request
curl https://api.webanto.com/api/v1/images/remove-background \
-H "Authorization: Bearer $WEBANTO_API_KEY" \
-H "Content-Type: image/jpeg" \
--data-binary @product.jpg \
--output cutout.pngResponse
HTTP/1.1 200 OK
Content-Type: image/png
X-Webanto-Model: birefnet-general
X-Webanto-Credits: 2
<raw PNG bytes — product on solid white>Chat
Generate a chat completion. Requires a key scoped for chat.
POST /api/v1/chat
- model
- The chat model to use: "qwen".
- messages
- An array of up to 50 message objects with role and content fields. Role is system, user, or assistant.
- max_tokens
- Optional. Maximum tokens to generate (up to 4096). Reasoning calls are floored to 3072 so hidden reasoning can't consume the whole budget and return empty content; the floor is not applied when reasoning_effort is "none".
- temperature
- Optional. Sampling temperature between 0 and 2.
- reasoning_effort
- Optional. Set to "none" to skip the model's hidden reasoning phase — dramatically fewer completion tokens (and therefore credits) on extraction and classification work, at the cost of multi-step reasoning quality. "low", "medium" and "high" are accepted for OpenAI SDK compatibility but are not differentiated: all keep reasoning on, which is the default.
Request
curl https://api.webanto.com/api/v1/chat \
-H "Authorization: Bearer $WEBANTO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen",
"messages": [{ "role": "user", "content": "Explain embeddings in one sentence." }]
}'Response
{
"id": "chatcmpl-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"object": "chat.completion",
"created": 1721260800,
"model": "qwen",
"choices": [
{
"index": 0,
"message": { "role": "assistant", "content": "..." },
"finish_reason": "stop"
}
],
"usage": { "prompt_tokens": 12, "completion_tokens": 24, "total_tokens": 36 },
"credits": 1
}Request — reasoning disabled
For extraction, classification, and structured-output work, set reasoning_effort to "none". The model skips its hidden reasoning phase, which cuts completion tokens — and therefore credits — by a large factor, and removes the risk of an empty response caused by reasoning consuming the whole max_tokens budget.
curl https://api.webanto.com/api/v1/chat \
-H "Authorization: Bearer $WEBANTO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen",
"reasoning_effort": "none",
"messages": [{ "role": "user", "content": "Extract the year as a bare number: The treaty was signed in 1885." }]
}'Status & health
Two lightweight checks: an unauthenticated liveness probe and an authenticated key check.
GET /api/v1/status
Liveness — no auth. Returns status and timestamp fields.
{ "status": "ok", "timestamp": "..." }GET /api/v1/health
Verifies your key and returns ok, organizationId, and scopes fields.
{ "ok": true, "organizationId": "...", "scopes": ["chat", "embeddings", "images"] }Credits & rate limits
Embeddings are charged by number of inputs; chat is charged by total tokens used. Each response includes the credits charged. Requests are rate limited per API key; exceeding the limit returns 429 with a Retry-After header.

