SiberAI has no generation webhooks — design your own job queue

SiberAI has no generation webhooks — design your own job queue

This article was prepared by the SiberAI team.

Many platforms offer “call this URL when the model finishes.” SiberAI’s customer API for Siber v3 does not. The webhooks documentation is explicit: there is no callback delivery when generation completes. Results arrive on the synchronous JSON response or on the SSE stream you already opened. Treating a fictional webhook_url field as a contract is a common integration bug.

What “not offered in this release” means

The docs mark generation webhooks as out of scope for the current customer API. Adding a URL-shaped field to a Chat Completions or Responses body does not create a delivery obligation. Your application must own job IDs, bounded retries and result storage if work continues after the HTTP call returns.

That design forces a clean split:

  • Interactive UI → prefer SSE (stream: true) and render deltas as they arrive.
  • Server batch jobs → use ordinary JSON responses, store the result under your job id, and reconcile usage separately.
  • Long workflows → your queue worker calls SiberAI, then writes to your database; SiberAI will not POST back later.

How to structure a worker without webhooks

  1. Enqueue a job with an idempotency key you control.
  2. Worker reads secrets from the environment (sai_ide_ prefix), sets API base path /api/siberai/v1 on siberai.net, model siber-v3.
  3. Call Chat Completions or Responses with a capped max_tokens / max_output_tokens (1–8192; default 4096).
  4. Persist the response body and any usage fields your client surfaces.
  5. On transport failure, decide retry with backoff; on usage_reconciliation_required or interrupted streams, check billing state before blind replay.
  6. Never assume “no HTTP body yet” means “no reservation happened.”

Streaming is not a webhook substitute—use it correctly

SSE is still request/response scoped: your client holds the connection. A network chunk may contain part of a UTF-8 character or several SSE events; accumulate data: lines until an event boundary. The gateway sets stream options so usage can appear on the stream. Client cancellation is passed inward; partial tokens may already exist, and missing usage can leave a reservation in RECONCILE. That is the opposite of “fire webhook later when settled.”

Error handling that fits a queue

Evaluate HTTP status and error.code together. Auth failures, insufficient balance and concurrency limits need different tickets than malformed JSON. Keep webhook-shaped retries out of the picture: retrying a job that already reserved balance without reading the panel can worsen reconciliation. Log your job id next to any request id the error payload exposes, without logging the Bearer token.

Migration myth

If you previously integrated a vendor that POSTed completion events, delete that assumption from diagrams. SiberAI’s implemented customer endpoints centre on model listing, Chat Completions and Responses—not outbound webhooks, not image generation, not embeddings as a substitute delivery channel. Build the queue on your side; keep the model call short and observable.

References: webhooks, streaming, errors, gateway.

FAQ

Q: Can I pass webhook_url and expect a POST?
A: No. The docs state that field does not create a delivery contract on this API.

Q: How do interactive apps get incremental text?
A: Use SSE with stream: true and parse events on the open connection.

Q: Who stores job results?
A: Your application. SiberAI returns the generation on the same call (JSON or SSE).

Q: What if the stream drops mid-way?
A: Partial content may exist; check usage/reservation state before retrying the same unit of work.

Architecture sketch for reviewers

Draw three boxes: API gateway (auth, balance reserve, model call), your worker (queue, idempotency, DB), your UI (SSE or polling your DB). Do not draw an arrow from SiberAI to your public HTTPS endpoint labelled “webhook.” Security reviewers will ask how you authenticate that callback; the honest answer for this product is that the callback is not part of the customer API.

When product managers insist on “notify Slack when done,” implement that inside your worker after a successful JSON response—not as a provider feature you hope appears because another LLM vendor offered it.

Sources

Disclosure: Independent overview of SiberAI (siberai.net) public documentation; not an official SiberAI publication.

Yorumlar

Bu blogdaki popüler yayınlar

SiberAI’de Chat Completions mi, Responses mi?

Связь с нативным движком SiberAI: приватный IPC, не публичный API расширений

KVKK perspektifinden yapay zeka API'lerine veri gönderirken dikkat edilecekler