Claude Opus 4.5 Webhook Guide — Use Synchronous API Responses
Claude Opus 4.5 does not need a webhook on 97AI.PRO because chat completions return synchronously from `https://www.lithovas.com/api/chat`. Use normal HTTP retry logic, server-side logging, and idempotent request ids. Webhooks are mainly for long-running media generation tasks.
Recommended request flow
- Send the request from your backend to `https://www.lithovas.com/api/chat`.
- Attach your own request id in logs so retries can be traced.
- Persist the final response, token/vector usage, credits, and balance when the request succeeds.
- Retry transient HTTP failures with exponential backoff; do not retry validation errors.
State handling
| State | Meaning | Action |
|---|---|---|
| REQUEST | Client sends one synchronous HTTP request | Keep a client request id for retry safety |
| SUCCESS | Claude Opus 4.5 returns the final response in the same call | Persist text, vectors, tokens, credits, or balance |
| ERROR | The HTTP request fails or times out | Retry with backoff and do not create duplicate billing records |
When a webhook still makes sense
If your product wraps Claude Opus 4.5 inside a longer workflow, send your own internal webhook after the synchronous API response succeeds. For example: embed documents, store vectors, then notify your indexing service that a collection is ready.
Frequently asked questions
Does Claude Opus 4.5 support webhook_url?+
No webhook URL is needed for Claude Opus 4.5 on 97AI.PRO. The response returns directly in the HTTP call.
How do I avoid duplicate billing on retries?+
Only retry network or 5xx failures, and store your own request id. 97AI.PRO bills only successful calls, but your app should still prevent duplicate downstream writes.
What timeout should I use?+
Use a timeout appropriate for your backend route and retry queue. For user-facing flows, run the call server-side and show a loading state.
Can I combine Claude Opus 4.5 with media webhooks?+
Yes. A common workflow is synchronous chat or embedding first, then async image/video generation with a webhook callback.
Do failed requests cost money?+
No. Failed chat completions cost $0 on 97AI.PRO.
Ready to try Claude Opus 4.5?
Sign up on 97AI.PRO, top up with credit card / USDC / Alipay, and get an API key in under 60 seconds.
