IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /get-started.md).

Python module

max.pipelines.request

Request types for MAX API.

Submodules​

max.pipelines.request.provider_optionsProvider-specific options for MAX platform and modalities.

Base request types​

RequestProtocol representing a generic request within the MAX API.
RequestIDA unique immutable identifier for a request.
RequestTypeType variable for request types.
DUMMY_REQUEST_IDStand-in request ID for work that has no client request, such as the warmup pass run while capturing a CUDA graph.

Responses API request​

OpenResponsesRequestGeneral request container for OpenResponses API requests.
OpenResponsesRequestBodyRequest body for creating a response.
ResponseResourceThe response from the model.

Messages​

AssistantMessageA message from the assistant.
DeveloperMessageA message from the application developer.
InputMessageA message the client sends with a request, in any input role.
MessageA generic message in the conversation.
MessageRoleThe role of the message author.
MessageStatusThe status of the message.
SystemMessageA system message that guides the assistant's behavior.
UserMessageA message from the user.

Input content​

InputContentThe content parts an input message may carry: text, an image, a file, or video.
InputFileContentFile content in input messages.
InputImageContentImage content in input messages.
InputTextContentText content in input messages.
InputVideoContentVideo content in input messages.
ItemReferenceParamReference to an item in the conversation.
ImageDetailControls image processing detail level.

Output content​

OutputAudioContentAudio content generated by the model in output messages.
OutputContentThe content parts an output message may carry, deserialized through the type field of each part.
OutputImageContentImage content generated by the model in output messages.
OutputTextContentText content in output messages.
OutputTokensDetailsDetailed token count information for output.
OutputVideoContentVideo content generated by the model in output messages.
RefusalContentRefusal content when the model declines to respond.

Tools​

AllowedToolChoiceSpecifies a subset of allowed tools and selection mode.
FunctionCallA function call generated by the model.
FunctionCallOutputThe output from a function call.
FunctionCallStatusThe status of the function call.
FunctionToolA function tool definition in the response.
FunctionToolChoiceSpecifies a particular function to call.
FunctionToolParamA function tool definition in the request.
ToolChoiceHow a request constrains tool use: a preset mode, a forced function call, or a subset of allowed tools.
ToolChoiceValueEnumControls which (if any) tool is called by the model.

Response format​

JsonObjectFieldJSON object response format.
JsonObjectParamConfiguration for JSON object responses.
JsonSchemaFieldJSON schema response format.
JsonSchemaParamConfiguration for JSON schema-constrained responses.
ResponseFormatThe response format reported back in a response: plain text, a JSON object, or a JSON schema.
ResponseFormatParamThe client-supplied form of a response format: plain text, a JSON object, or a JSON schema.
TextFieldText response format.
TextParamConfiguration for text generation.

Reasoning​

ReasoningBodyReasoning information in the response.
ReasoningEffortEnumThe effort level for extended reasoning.
ReasoningParamConfiguration for extended reasoning.
ReasoningReferenceReference to reasoning in the response.
ReasoningReferenceParamReference to previous reasoning content.
ReasoningSummaryContentSummary of the model's reasoning process.
ReasoningSummaryEnumThe level of detail for reasoning summaries.

Usage and tokens​

AudioGenerationDetailsAudio generation usage metadata.
ErrorError information.
ImageGenerationDetailsImage generation usage metadata.
IncludeEnumAdditional data to include in the response.
IncompleteDetailsDetails about why a generation was incomplete.
InputTokensDetailsDetailed token count information for input.
LogProbLog probability information for output tokens.
ServiceTierEnumThe service tier for request processing.
StreamOptionsParamOptions for streaming responses.
TopLogProbLog probability information for a token.
TruncationEnumControls message truncation behavior.
UrlCitationBodyURL citation in response.
UrlCitationParamURL citation in request.
UsageToken usage statistics.
VerbosityEnumThe verbosity level for responses.

Protocols​

FastAPIRequestProtocolMinimal protocol for FastAPI/Starlette Request objects.
MediaDataUriFetcherFetches a web media URL and returns it as a base64 data: URI.