The gateway injects the operator's connected provider credential at the boundary. It validates the request, Passport, and service scope before the call. Enforced mode also requires Intent approval. A Passport with Mission references must match an active Mission.
curl -X POST https://api.getstack.run/v1/llm/openai/chat/completions \
-H "Authorization: Bearer $STACK_TOKEN" \
-H "X-Passport-Token: $STACK_PASSPORT" \
-H "Content-Type: application/json" \
-d '{"model":"gpt-5-mini","messages":[{"role":"user","content":"Summarize this"}],"max_completion_tokens":300}'Enforced mode also requires X-Intent-Approval-Id. Streaming requests use the provider's normal stream: true body. STACK scans each complete server-sent event before it writes those bytes downstream.
Calls with unbounded variable cost, such as web search or generated audio and images, are rejected when STACK cannot reserve a safe maximum.
Provider cost, STACK fee, wallet hold, and payer are separate fields. Provider cost is not the same as STACK wallet spend. See Usage API.