Skip to main content
Helicone OSS LLM Observability

Chat Completions (Gateway)

Create chat completions via the AI Gateway
1 min read
post/v1/chat/completions
Request example
post/v1/chat/completions

This request schema applies when using the Helicone AI Gateway with pass‑through billing (credits). In BYOK mode, the standard OpenAI Chat Completions schema is allowed. The schema is defined based on fields that are stable across all provider-model mappings.

Learn more about pass‑through billing vs BYOK.

Body

application/json
metadataobject · enum<string>#
Show child attributes
top_logprobsinteger#

Range: 0–20

temperaturenumber · enum<string>#
Show child attributes
top_pnumber · enum<string>#
Show child attributes
top_knumber · enum<string>#
Show child attributes
userstring#
safety_identifierstring#
prompt_cache_keystring#
cache_controlobject#
Show child attributes
typeenum<string>#
Options:ephemeral
ttlstring#
service_tierenum<string>#
Show child attributes
messagesobject[]required#

Items: min 1

Show child attributes
modelstringrequired#
modalitiesenum<string>[] · enum<string>#
Show child attributes
verbosityenum<string>#
Show child attributes
reasoning_effortenum<string>#
Show child attributes
reasoning_optionsobject#
Show child attributes
budget_tokensintegerrequired#

Range: -9007199254740991–9007199254740991

max_completion_tokensinteger#

Range: -9007199254740991–9007199254740991

frequency_penaltynumber#

Default: 0

Range: -2–2

presence_penaltynumber#

Default: 0

Range: -2–2

response_formatobject#
Show child attributes
storeboolean#

Default: false

streamboolean#

Default: false

stopstring · string[]#
Show child attributes
logit_biasobject#

Default: null

Show child attributes
{key}integer#

Range: -9007199254740991–9007199254740991

logprobsboolean#

Default: false

max_tokensinteger#

Range: -9007199254740991–9007199254740991

ninteger#

Default: 1

Range: 1–128

predictionobject#
Show child attributes
typeenum<string>required#
Options:content
contentstring · object[]required#
Show child attributes
reasoningstring#
seedinteger#

Range: -9007199254740991–9007199254740991

stream_optionsobject · enum<string>#
Show child attributes
toolsobject[]#
Show child attributes
tool_choiceenum<string> · object#
Show child attributes
parallel_tool_callsboolean#

Default: true

function_callenum<string> · object#
Show child attributes
functionsobject[]#

Items: 1–128

Show child attributes
descriptionstring#
namestringrequired#
parametersobject#
context_editingobject#
Show child attributes
enabledbooleanrequired#
clear_tool_usesobject#
Show child attributes
triggerinteger#

Range: -9007199254740991–9007199254740991

keepinteger#

Range: -9007199254740991–9007199254740991

clear_at_leastinteger#

Range: -9007199254740991–9007199254740991

exclude_toolsstring[]#
clear_tool_inputsboolean#
clear_thinkingobject#
Show child attributes
keepinteger · enum<string>#
Show child attributes
image_generationobject#
Show child attributes
aspect_ratiostringrequired#
image_sizestringrequired#

Responses

200
Request accepted