Model I/O

ChatCompletionInput

Properties


messages array[ChatCompletionInputMessage, ChatCompletionOutputMessage] required

Messages


response_format ChatCompletionResponseFormatJSONSchema, ChatCompletionResponseFormatText

Response Format

Default: None

ChatCompletionJSONSchema

Properties


name string required

The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.


description string

A description of what the response format is for, used by the model to determine how to respond in the format.

Default: None


schema object

The schema for the response format, described as a JSON Schema object. Learn how to build JSON schemas here.

Default: None


strict boolean required

Whether to enable strict schema adherence when generating the output. If set to true, the model will always follow the exact schema defined in the schema field. Only a subset of JSON Schema is supported when strict is true. To learn more, read the Structured Outputs guide.

ChatCompletionModelOutput

Properties


choices array[ChatCompletionModelOutputChoice] required

Choices


usage ModelUsage

Default: None

ChatCompletionModelOutputChoice

Properties


message ChatCompletionOutputMessage required

ChatCompletionResponseFormatJSONSchema

Properties


type Literal “json_schema required

The type of response format being defined. Always json_schema.


json_schema ChatCompletionJSONSchema required

Structured Outputs configuration options, including a JSON Schema.

ChatCompletionResponseFormatText

Properties


type Literal “text required

The type of response format being defined. Always text.

EmbeddingsModelOutput

Properties


embeddings array[array[number]] required

Embeddings


usage ModelUsage

Default: None

ModelUsage

Token usage statistics for a model inference call.

Properties


num_completion_tokens integer

The number of completion tokens used.

Default: None


num_prompt_tokens integer

The number of prompt tokens used.

Default: None

OpenResponsesModelOutput

Model output in Open Responses format.

Used when the model returns a response object containing a sequence of OpenResponse output items (assistant messages, function calls, function call outputs, etc.) from a single model.predict() call.

Properties


items array[Message, FunctionCall, FunctionCallOutput, CustomTaskInputMessage, CustomTaskOutputMessage] required

Items


usage ModelUsage

Default: None

RAGCompletionModelOutputChoice

Properties


message ChatCompletionOutputMessage required


references array[RAGReference] required

References

RAGCompletionOutput

Properties


choices array[RAGCompletionModelOutputChoice] required

Choices


usage ModelUsage

Default: None

RAGReference

A reference retrieved from the knowledge base during RAG inference.

Properties


content string required

The text content of the reference.