What the gateway expects of your endpoint, and what it refuses to pass on.
The limits#
| Requirement | Value |
|---|---|
| Scheme | HTTPS. Private, loopback and link-local addresses are refused at publish |
| First byte | Within 5 seconds of idle at any point |
| Whole response | Within 120 seconds |
| Response size | 10 MiB, enforced while streaming |
| Method | Whatever the developer sent, usually POST |
| Connections | Up to 64 concurrent per creator host |
Streaming#
Server-sent events are supported and are the right shape for a long-running tool. The gateway relays your bytes without buffering the whole response, so a developer sees output as you produce it.
If you fail after the first byte has reached the developer, the charge stands: they received part of the work and you did it. If you fail before anything reached them, they are refunded automatically and you are not paid. That boundary is the whole of the billing rule.
What the gateway refuses to relay#
Your response is a dumb pipe with four exceptions, each of which exists because relaying it would hurt the developer:
| Header or status | What happens | Why |
|---|---|---|
3xx | Clamped to 502 | We never follow a redirect. Relaying one would make a stock client resend the developer's credentials to a host you chose |
Location, Content-Location, Refresh | Stripped | Same reason: they steer a client elsewhere |
Content-Encoding | Stripped | We never request compression, so relaying it would make a client inflate an unbounded body past the response cap |
Set-Cookie | Stripped | A creator does not get to set state in a developer's client |
402 | Clamped to 502 | 402 is the gateway's own code for an exhausted wallet. A creator returning it would be indistinguishable from us |
The circuit breaker#
If your endpoint fails repeatedly, a per-process breaker opens and calls are refused for a cooldown rather than queued against you. That protects developers from waiting on a dead endpoint and protects you from a thundering retry herd.
Separately, an endpoint that fails for long enough is de-listed from the public catalog. It is restored when it recovers; the version is not deleted and your published name is never released.
What to expose#
Nothing is required, but a cheap unauthenticated health route is worth having for your own monitoring. Do not put your tool behind it: the gateway only ever calls the endpoint you published.