Create a chat completion using various AI models
input_file content type. You can provide the PDF as either base64-encoded data or a URL.
type: Must be "input_file"filename: The name of the PDF file (e.g., "document.pdf")file_data: Either base64-encoded PDF content or a URL to the PDF fileAPI key for authentication
An array of message objects with role and content
The model name. If omitted, defaults to openai/gpt-4o-mini.
"openai/gpt-4o-mini"
Maximum number of tokens to generate
Controls randomness of the output
Controls diversity of the output
Enable Server-Sent Events (SSE) streaming responses
Available tools for function calling
Specifies how tool calling should be handled
For structured responses (some models only)