Gateway reference¶
Purpose: the exact contract between your program and the gateway: what it accepts, what it adds, how it fails. Everything here was taken from the gateway's 0.9.0-beta.5 release and checked against a running gateway.
| Page | Look up |
|---|---|
| Endpoints | Every path, by SDK format; which translate across providers, which need a provider of the same format, which the gateway answers itself |
| Request headers | How to send your key; the headers you may send to steer a call |
| Response headers | Every header the gateway adds to an answer, and what it's for |
| Errors | Every error code, its status and stage; the body in your SDK's format |
| Streaming | Usage in streams, translated streams, errors mid-stream, failover |
| Limits | Rate limits, request size, time limits |
The promises¶
- Your SDK's own format. Answers and errors come back in the format you called in, so your SDK behaves as its documentation says.
- Stable error codes. A code in
x-vidai-error-codeis never renamed or removed. - Adapt, and say so. On a translated call, a setting the target can't take is dropped, clamped or approximated,
and named in
x-vidai-adapted, never silently. - Never a silent reroute. A call that can't be served by a provider of another format gets a clear 400, never a surprise elsewhere.
- No secrets in answers. An error never names a provider's address, and never echoes a key.