Chat Completions
Generate chat-based completions using the OpenAI-compatible chat endpoint.
Server tools
/v1/chat/completions supports regular function tools and these gateway-managed server tools:
gateway:datetimegateway:web_searchgateway:web_fetch
Datetime example
gateway:web_search adds server_tool_use.web_search_requests and may also add server_tool_use.web_fetch_requests when fetched result content is returned. gateway:web_fetch adds server_tool_use.web_fetch_requests.
Streaming note
stream: true is also supported. For gateway-managed server tools, AI Stats may materialize the upstream tool-call turn and re-emit a synthetic stream after continuing the loop.Authorizations
Bearer token authentication
Body
1-2 <= x <= 2x >= 1x >= 1Unique identifier for grouping related requests (for example, a conversation or agent workflow) for observability.
256-2 <= x <= 2-9223372036854776000 <= x <= 92233720368547760000 <= x <= 2Tool definitions for model function calls and gateway server tools. Built-in gateway server tools are gateway:datetime, gateway:web_search, and gateway:web_fetch.
- Option 1
- Option 2
- Option 3
- Option 4
x >= 1Tool selection strategy. gateway:datetime, gateway:web_search, and gateway:web_fetch are accepted and rewritten by the gateway into upstream function/tool targets.
auto, none, required, gateway:datetime, gateway:web_search, gateway:web_fetch 0 <= x <= 200 <= x <= 1text, image, audio Provider routing preferences for gateway selection.
Optional provider-specific options.
standard, priority, flex, batch Gateway debug controls. These flags are never forwarded upstream.