Messages
AssistantMessage
A message with role assistant.
Properties
type Literal “message”
The type of the message. Always set to message.
Default: message
id string required
The unique ID of the message.
status MessageStatus required
role Literal “assistant”
Role
Default: assistant
content array[InputTextContent, OutputTextContent, TextContent, SummaryTextContent, ReasoningTextContent, RefusalContent, InputImageContent, InputFileContent, InputVideoContent] required
The content of the message
ChatCompletionInputMessage
Properties
role string required
Role
content string, array[FileContentItem] required
Content
ChatCompletionOutputMessage
Properties
role string required
Role
content string required
Content
refusal string
Refusal
Default: None
FileContentItem
A file content item within an input message.
Properties
type Literal “file” required
Type
file FileRef required
FileRef
A reference to a file by its identifier.
Properties
file_id string required
The identifier of the file.
FunctionCall
A function tool call that was generated by the model.
Properties
type Literal “function_call”
The type of the item. Always function_call.
Default: function_call
id string required
The unique ID of the function call item.
call_id string required
The unique ID of the function tool call that was generated.
name string required
The name of the function that was called.
arguments string required
The arguments JSON string that was generated.
status FunctionCallStatus required
FunctionCallOutput
A function tool call output that was returned by the tool.
Properties
type Literal “function_call_output”
The type of the function tool call output. Always function_call_output.
Default: function_call_output
id string required
The unique ID of the function tool call output. Populated when this item is returned via API.
call_id string required
The unique ID of the function tool call generated by the model.
output string, array[InputTextContent, InputImageContent, InputFileContent] required
Output
status FunctionCallOutputStatusEnum required
InputFileContent
A file input to the model.
Properties
type Literal “input_file”
The type of the input item. Always input_file.
Default: input_file
filename string
The name of the file to be sent to the model.
Default: None
file_url string
The URL of the file to be sent to the model.
Default: None
InputImageContent
An image input to the model. Learn about image inputs.
Properties
type Literal “input_image”
The type of the input item. Always input_image.
Default: input_image
image_url string
Image Url
Default: None
detail ImageDetail required
InputTextContent
A text input to the model.
Properties
type Literal “input_text”
The type of the input item. Always input_text.
Default: input_text
text string required
The text input to the model.
LogProb
The log probability of a token.
Properties
token string required
Token
logprob number required
Logprob
bytes array[integer] required
Bytes
top_logprobs array[TopLogProb] required
Top Logprobs
Message
A message to or from the model.
Properties
type Literal “message”
The type of the message. Always set to message.
Default: message
id string required
The unique ID of the message.
status MessageStatus required
role MessageRole required
content array[InputTextContent, OutputTextContent, TextContent, SummaryTextContent, ReasoningTextContent, RefusalContent, InputImageContent, InputFileContent, InputVideoContent] required
The content of the message
OutputTextContent
A text output from the model.
Properties
type Literal “output_text”
The type of the output text. Always output_text.
Default: output_text
text string required
The text output from the model.
annotations array[UrlCitationBody, TextCitationBody] required
The annotations of the text output.
logprobs array[LogProb]
Logprobs
Default: None
ReasoningTextContent
Reasoning text from the model.
Properties
type Literal “reasoning_text”
The type of the reasoning text. Always reasoning_text.
Default: reasoning_text
text string required
The reasoning text from the model.
RefusalContent
A refusal from the model.
Properties
type Literal “refusal”
The type of the refusal. Always refusal.
Default: refusal
refusal string required
The refusal explanation from the model.
SummaryTextContent
A summary text from the model.
Properties
type Literal “summary_text”
The type of the object. Always summary_text.
Default: summary_text
text string required
A summary of the reasoning output from the model so far.
SystemMessage
A message with role system.
Properties
type Literal “message”
The type of the message. Always set to message.
Default: message
id string required
The unique ID of the message.
status MessageStatus required
role Literal “system”
Role
Default: system
content array[InputTextContent, OutputTextContent, TextContent, SummaryTextContent, ReasoningTextContent, RefusalContent, InputImageContent, InputFileContent, InputVideoContent] required
The content of the message
TextCitationBody
A citation referencing a plain-text source (e.g. a retrieved knowledge-base chunk).
Properties
type Literal “text_citation”
The type of the text citation. Always text_citation.
Default: text_citation
content string required
The text content of the cited source.
TopLogProb
The top log probability of a token.
Properties
token string required
Token
logprob number required
Logprob
bytes array[integer] required
Bytes
UrlCitationBody
A citation for a web resource used to generate a model response.
Properties
type Literal “url_citation”
The type of the URL citation. Always url_citation.
Default: url_citation
url string required
The URL of the web resource.
start_index integer required
The index of the first character of the URL citation in the message.
end_index integer required
The index of the last character of the URL citation in the message.
title string required
The title of the web resource.
UserMessage
A message with role user.
Properties
type Literal “message”
The type of the message. Always set to message.
Default: message
id string required
The unique ID of the message.
status MessageStatus required
role Literal “user”
Role
Default: user
content array[InputTextContent, OutputTextContent, TextContent, SummaryTextContent, ReasoningTextContent, RefusalContent, InputImageContent, InputFileContent, InputVideoContent] required
The content of the message
Enums
FunctionCallOutputStatusEnum
Similar to FunctionCallStatus. All three options are allowed here for compatibility, but because in practice these items will be provided by developers, only completed should be used.
Allowed Values:
in_progresscompletedincomplete
FunctionCallStatus
Allowed Values:
in_progresscompletedincomplete
MessageRole
Allowed Values:
userassistantsystemdeveloper
MessageStatus
Allowed Values:
in_progresscompletedincomplete