Skip to main content
POST
Create chat completion

Server tools

/v1/chat/completions supports regular function tools and these gateway-managed server tools:
  • gateway:datetime
  • phaseo:web_search
  • phaseo:web_fetch
  • phaseo:advisor
  • phaseo:image_generation

Datetime example

When a server tool is used, usage includes:
phaseo:web_search adds server_tool_use.web_search_requests, server_tool_use.web_search_results, and server_tool_use.web_search_extra_results. phaseo:web_fetch adds server_tool_use.web_fetch_requests.

Streaming note

stream: true is also supported. For gateway-managed server tools, Phaseo may materialize the upstream tool-call turn and re-emit a synthetic stream after continuing the loop.

Authorizations

Authorization
string
header
required

Bearer token authentication

Body

application/json
model
string
required
messages
object[]
required
Minimum array length: 1
reasoning
object
reasoning_effort
enum<string>

OpenAI-compatible alias for reasoning.effort.

Available options:
none,
minimal,
low,
medium,
high,
xhigh,
max
frequency_penalty
number
Required range: -2 <= x <= 2
logit_bias
object
max_completion_tokens
integer
Required range: x >= 1
max_tokens
integer
Required range: x >= 1
metadata
object
session_id
string

Unique identifier for grouping related requests (for example, a conversation or agent workflow) for observability.

Maximum string length: 256
presence_penalty
number
Required range: -2 <= x <= 2
seed
integer
Required range: -9223372036854776000 <= x <= 9223372036854776000
store
boolean
stream
boolean
default:false
stream_options
object
temperature
number
default:1
Required range: 0 <= x <= 2
tools
object[]

Tool definitions for model function calls and gateway server tools. Built-in server tools include datetime, web search, web fetch, Advisor, Subagent, Fusion, model search, image generation, and patch creation.

max_tool_calls
integer
Required range: x >= 1
parallel_tool_calls
boolean
default:true
tool_choice

Tool selection strategy. Phaseo server-tool types are accepted and rewritten into upstream function/tool targets.

Available options:
auto,
none,
required,
phaseo:datetime,
phaseo:web_search,
phaseo:web_fetch,
phaseo:subagent,
phaseo:fusion,
phaseo:search_models,
gateway:datetime,
gateway:web_search,
gateway:web_fetch
logprobs
boolean
default:false
top_logprobs
integer
Required range: 0 <= x <= 20
top_p
number
Required range: 0 <= x <= 1
stop
response_format
modalities
enum<string>[]
Available options:
text,
image,
audio
image_config
object
usage
boolean
provider

Provider selector. Use a string for a single provider, or routing options such as { "only": ["groq"] }.

Available options:
openai,
anthropic,
google-ai-studio,
gemini,
mistral,
x-ai,
xai,
groq,
together
provider_options
object

Optional provider-specific options.

user_id
string
user
string
service_tier
enum<string>
Available options:
standard,
fast,
priority,
flex,
batch
prompt_cache_key
string | null
safety_identifier
string | null
meta
boolean
default:false
echo_upstream_request
boolean
debug
object

Gateway debug controls. These flags are never forwarded upstream.

Response

200 - application/json

Chat completion response

id
string
nativeResponseId
string | null
object
string
created
integer
model
string
provider
string
choices
object[]
usage
object
Last modified on July 26, 2026