Create Chat Completion
Generate a chat completion response for the given conversation.
post/chat/completions
Request body
max_tokensinteger nullable
temperaturenumber nullable
top_kinteger nullable
top_pnumber nullable
ninteger nullable
presence_penaltynumber nullable
frequency_penaltynumber nullable
modelstring required
streamboolean nullable
cum_logprobsboolean nullable
logprobsboolean nullable
top_logprobsinteger nullable
best_ofinteger nullable
response_metadataobject nullable
diverse_first_tokenboolean nullable
_inputsinteger[] nullable
_prompt_token_lengthinteger nullable
tool_choice'none' | 'auto' | 'required' nullable
parallel_tool_callsboolean nullable
search_mode'web' | 'academic' | 'sec' nullable
return_imagesboolean nullable
return_related_questionsboolean nullable
num_search_resultsinteger
num_imagesinteger
enable_search_classifierboolean nullable
disable_searchboolean nullable
search_domain_filterstring[] nullable
search_language_filterstring[] nullable
search_tenantstring nullable
ranking_modelstring nullable
latitudenumber nullable
longitudenumber nullable
countrystring nullable
search_recency_filter'hour' | 'day' | 'week' | 'month' | 'year' nullable
search_after_date_filterstring nullable
search_before_date_filterstring nullable
last_updated_before_filterstring nullable
last_updated_after_filterstring nullable
image_format_filterstring[] nullable
image_domain_filterstring[] nullable
safe_searchboolean nullable
file_workspace_idstring nullable
updated_before_timestampinteger nullable
updated_after_timestampinteger nullable
search_internal_propertiesobject nullable
use_threadsboolean nullable
thread_idstring nullable
stream_mode'full' | 'concise'
_debug_pro_searchboolean
has_image_urlboolean
reasoning_effort'minimal' | 'low' | 'medium' | 'high' nullable
language_preferencestring nullable
user_original_querystring nullable
_force_new_agentboolean nullable
response_formatting_localestring nullable
Optional locale tag used for response formatting conventions. Locale-style values such as es_mx, EN-us, and zh-TW are normalized to the canonical form (es-MX, en-US, zh-TW). Invalid values are ignored.
Response
Successful Response
idstring required
modelstring required
createdinteger required
objectstring
citationsstring[] nullable
type'message' | 'info' | 'end_of_stream'
status'PENDING' | 'COMPLETED'