Everything you need to call the chat, embeddings, and image generation endpoints.
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
Every endpoint follows the same path — authenticate, check the key's scope, run inference, and return the result with its credit cost.
Your server
Bearer auth
Scope check
Model inference
Response + credits
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 |
Generate text embeddings with nomic-embed-text or clip. Requires a key scoped for embeddings.
POST /api/v1/embeddings
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
}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
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
}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
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
}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>Generate a chat completion. Requires a key scoped for chat.
POST /api/v1/chat
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." }]
}'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"] }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.