Create eval run
post /evals/{eval_id}/runs
Kicks off a new run for a given evaluation, specifying the data source, and what model configuration to use to test. The datasource will be validated against the schema specified in the config of the evaluation.
Path Parameters
eval_id: string
Body Parameters
-
data_source: CreateEvalJSONLRunDataSource or CreateEvalCompletionsRunDataSource or object { source, type, input_messages, 2 more }Details about the run's data source.
-
CreateEvalJSONLRunDataSource object { source, type }A JsonlRunDataSource object with that specifies a JSONL file that matches the eval
-
source: object { content, type } or object { id, type }Determines what populates the
itemnamespace in the data source.-
EvalJSONLFileContentSource object { content, type }-
content: array of object { item, sample }The content of the jsonl file.
-
item: map[unknown] -
sample: optional map[unknown]
-
-
type: "file_content"The type of jsonl source. Always
file_content."file_content"
-
-
EvalJSONLFileIDSource object { id, type }-
id: stringThe identifier of the file.
-
type: "file_id"The type of jsonl source. Always
file_id."file_id"
-
-
-
type: "jsonl"The type of data source. Always
jsonl."jsonl"
-
-
CreateEvalCompletionsRunDataSource object { source, type, input_messages, 2 more }A CompletionsRunDataSource object describing a model sampling configuration.
-
source: object { content, type } or object { id, type } or object { type, created_after, created_before, 3 more }Determines what populates the
itemnamespace in this run's data source.-
EvalJSONLFileContentSource object { content, type }-
content: array of object { item, sample }The content of the jsonl file.
-
item: map[unknown] -
sample: optional map[unknown]
-
-
type: "file_content"The type of jsonl source. Always
file_content."file_content"
-
-
EvalJSONLFileIDSource object { id, type }-
id: stringThe identifier of the file.
-
type: "file_id"The type of jsonl source. Always
file_id."file_id"
-
-
StoredCompletionsRunDataSource object { type, created_after, created_before, 3 more }A StoredCompletionsRunDataSource configuration describing a set of filters
-
type: "stored_completions"The type of source. Always
stored_completions."stored_completions"
-
created_after: optional numberAn optional Unix timestamp to filter items created after this time.
-
created_before: optional numberAn optional Unix timestamp to filter items created before this time.
-
limit: optional numberAn optional maximum number of items to return.
-
metadata: optional MetadataSet of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard.
Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.
-
model: optional stringAn optional model to filter by (e.g., 'gpt-4o').
-
-
-
type: "completions"The type of run data source. Always
completions."completions"
-
input_messages: optional object { template, type } or object { item_reference, type }Used when sampling from a model. Dictates the structure of the messages passed into the model. Can either be a reference to a prebuilt trajectory (ie,
item.input_trajectory), or a template with variable references to theitemnamespace.-
TemplateInputMessages object { template, type }-
template: array of EasyInputMessage or object { content, role, type }A list of chat messages forming the prompt or context. May include variable references to the
itemnamespace, ie {{item.name}}.-
EasyInputMessage object { content, role, phase, type }A message input to the model with a role indicating instruction following hierarchy. Instructions given with the
developerorsystemrole take precedence over instructions given with theuserrole. Messages with theassistantrole are presumed to have been generated by the model in previous interactions.-
content: string or ResponseInputMessageContentListText, image, or audio input to the model, used to generate a response. Can also contain previous assistant responses.
-
TextInput = stringA text input to the model.
-
ResponseInputMessageContentList = array of ResponseInputContentA list of one or many input items to the model, containing different content types.
-
ResponseInputText object { text, type }A text input to the model.
-
text: stringThe text input to the model.
-
type: "input_text"The type of the input item. Always
input_text."input_text"
-
-
ResponseInputImage object { detail, type, file_id, image_url }An image input to the model. Learn about image inputs.
-
detail: "low" or "high" or "auto" or "original"The detail level of the image to be sent to the model. One of
high,low,auto, ororiginal. Defaults toauto.-
"low" -
"high" -
"auto" -
"original"
-
-
type: "input_image"The type of the input item. Always
input_image."input_image"
-
file_id: optional stringThe ID of the file to be sent to the model.
-
image_url: optional stringThe URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.
-
-
ResponseInputFile object { type, detail, file_data, 3 more }A file input to the model.
-
type: "input_file"The type of the input item. Always
input_file."input_file"
-
detail: optional "low" or "high"The detail level of the file to be sent to the model. Use
lowfor the default rendering behavior, orhighto render the file at higher quality. Defaults tolow.-
"low" -
"high"
-
-
file_data: optional stringThe content of the file to be sent to the model.
-
file_id: optional stringThe ID of the file to be sent to the model.
-
file_url: optional stringThe URL of the file to be sent to the model.
-
filename: optional stringThe name of the file to be sent to the model.
-
-
-
-
role: "user" or "assistant" or "system" or "developer"The role of the message input. One of
user,assistant,system, ordeveloper.-
"user" -
"assistant" -
"system" -
"developer"
-
-
phase: optional "commentary" or "final_answer"Labels an
assistantmessage as intermediate commentary (commentary) or the final answer (final_answer). For models likegpt-5.3-codexand beyond, when sending follow-up requests, preserve and resend phase on all assistant messages — dropping it can degrade performance. Not used for user messages.-
"commentary" -
"final_answer"
-
-
type: optional "message"The type of the message input. Always
message."message"
-
-
EvalMessageObject object { content, role, type }A message input to the model with a role indicating instruction following hierarchy. Instructions given with the
developerorsystemrole take precedence over instructions given with theuserrole. Messages with theassistantrole are presumed to have been generated by the model in previous interactions.-
content: string or ResponseInputText or object { text, type } or 3 moreInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.
-
TextInput = stringA text input to the model.
-
ResponseInputText object { text, type }A text input to the model.
-
OutputText object { text, type }A text output from the model.
-
text: stringThe text output from the model.
-
type: "output_text"The type of the output text. Always
output_text."output_text"
-
-
InputImage object { image_url, type, detail }An image input block used within EvalItem content arrays.
-
image_url: stringThe URL of the image input.
-
type: "input_image"The type of the image input. Always
input_image."input_image"
-
detail: optional stringThe detail level of the image to be sent to the model. One of
high,low, orauto. Defaults toauto.
-
-
ResponseInputAudio object { input_audio, type }An audio input to the model.
-
input_audio: object { data, format }-
data: stringBase64-encoded audio data.
-
format: "mp3" or "wav"The format of the audio data. Currently supported formats are
mp3andwav.-
"mp3" -
"wav"
-
-
-
type: "input_audio"The type of the input item. Always
input_audio."input_audio"
-
-
GraderInputs = array of string or ResponseInputText or object { text, type } or 2 moreA list of inputs, each of which may be either an input text, output text, input image, or input audio object.
-
TextInput = stringA text input to the model.
-
ResponseInputText object { text, type }A text input to the model.
-
OutputText object { text, type }A text output from the model.
-
text: stringThe text output from the model.
-
type: "output_text"The type of the output text. Always
output_text."output_text"
-
-
InputImage object { image_url, type, detail }An image input block used within EvalItem content arrays.
-
image_url: stringThe URL of the image input.
-
type: "input_image"The type of the image input. Always
input_image."input_image"
-
detail: optional stringThe detail level of the image to be sent to the model. One of
high,low, orauto. Defaults toauto.
-
-
ResponseInputAudio object { input_audio, type }An audio input to the model.
-
-
-
role: "user" or "assistant" or "system" or "developer"The role of the message input. One of
user,assistant,system, ordeveloper.-
"user" -
"assistant" -
"system" -
"developer"
-
-
type: optional "message"The type of the message input. Always
message."message"
-
-
-
type: "template"The type of input messages. Always
template."template"
-
-
ItemReferenceInputMessages object { item_reference, type }-
item_reference: stringA reference to a variable in the
itemnamespace. Ie, "item.input_trajectory" -
type: "item_reference"The type of input messages. Always
item_reference."item_reference"
-
-
-
model: optional stringThe name of the model to use for generating completions (e.g. "o3-mini").
-
sampling_params: optional object { max_completion_tokens, reasoning_effort, response_format, 4 more }-
max_completion_tokens: optional numberThe maximum number of tokens in the generated output.
-
reasoning_effort: optional ReasoningEffortConstrains effort on reasoning for reasoning models. Currently supported values are
none,minimal,low,medium,high, andxhigh. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.-
gpt-5.1defaults tonone, which does not perform reasoning. The supported reasoning values forgpt-5.1arenone,low,medium, andhigh. Tool calls are supported for all reasoning values in gpt-5.1. -
All models before
gpt-5.1default tomediumreasoning effort, and do not supportnone. -
The
gpt-5-promodel defaults to (and only supports)highreasoning effort. -
xhighis supported for all models aftergpt-5.1-codex-max. -
"none" -
"minimal" -
"low" -
"medium" -
"high" -
"xhigh"
-
-
response_format: optional ResponseFormatText or ResponseFormatJSONSchema or ResponseFormatJSONObjectAn object specifying the format that the model must output.
Setting to
{ "type": "json_schema", "json_schema": {...} }enables Structured Outputs which ensures the model will match your supplied JSON schema. Learn more in the Structured Outputs guide.Setting to
{ "type": "json_object" }enables the older JSON mode, which ensures the message the model generates is valid JSON. Usingjson_schemais preferred for models that support it.-
ResponseFormatText object { type }Default response format. Used to generate text responses.
-
type: "text"The type of response format being defined. Always
text."text"
-
-
ResponseFormatJSONSchema object { json_schema, type }JSON Schema response format. Used to generate structured JSON responses. Learn more about Structured Outputs.
-
json_schema: object { name, description, schema, strict }Structured Outputs configuration options, including a JSON Schema.
-
name: stringThe 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: optional stringA description of what the response format is for, used by the model to determine how to respond in the format.
-
schema: optional map[unknown]The schema for the response format, described as a JSON Schema object. Learn how to build JSON schemas here.
-
strict: optional booleanWhether to enable strict schema adherence when generating the output. If set to true, the model will always follow the exact schema defined in the
schemafield. Only a subset of JSON Schema is supported whenstrictistrue. To learn more, read the Structured Outputs guide.
-
-
type: "json_schema"The type of response format being defined. Always
json_schema."json_schema"
-
-
ResponseFormatJSONObject object { type }JSON object response format. An older method of generating JSON responses. Using
json_schemais recommended for models that support it. Note that the model will not generate JSON without a system or user message instructing it to do so.-
type: "json_object"The type of response format being defined. Always
json_object."json_object"
-
-
-
seed: optional numberA seed value to initialize the randomness, during sampling.
-
temperature: optional numberA higher temperature increases randomness in the outputs.
-
tools: optional array of ChatCompletionFunctionToolA list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported.
-
function: FunctionDefinition-
name: stringThe name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.
-
description: optional stringA description of what the function does, used by the model to choose when and how to call the function.
-
parameters: optional FunctionParametersThe parameters the functions accepts, described as a JSON Schema object. See the guide for examples, and the JSON Schema reference for documentation about the format.
Omitting
parametersdefines a function with an empty parameter list. -
strict: optional booleanWhether to enable strict schema adherence when generating the function call. If set to true, the model will follow the exact schema defined in the
parametersfield. Only a subset of JSON Schema is supported whenstrictistrue. Learn more about Structured Outputs in the function calling guide.
-
-
type: "function"The type of the tool. Currently, only
functionis supported."function"
-
-
top_p: optional numberAn alternative to temperature for nucleus sampling; 1.0 includes all tokens.
-
-
-
ResponsesRunDataSource object { source, type, input_messages, 2 more }A ResponsesRunDataSource object describing a model sampling configuration.
-
source: object { content, type } or object { id, type } or object { type, created_after, created_before, 8 more }Determines what populates the
itemnamespace in this run's data source.-
EvalJSONLFileContentSource object { content, type }-
content: array of object { item, sample }The content of the jsonl file.
-
item: map[unknown] -
sample: optional map[unknown]
-
-
type: "file_content"The type of jsonl source. Always
file_content."file_content"
-
-
EvalJSONLFileIDSource object { id, type }-
id: stringThe identifier of the file.
-
type: "file_id"The type of jsonl source. Always
file_id."file_id"
-
-
EvalResponsesSource object { type, created_after, created_before, 8 more }A EvalResponsesSource object describing a run data source configuration.
-
type: "responses"The type of run data source. Always
responses."responses"
-
created_after: optional numberOnly include items created after this timestamp (inclusive). This is a query parameter used to select responses.
-
created_before: optional numberOnly include items created before this timestamp (inclusive). This is a query parameter used to select responses.
-
instructions_search: optional stringOptional string to search the 'instructions' field. This is a query parameter used to select responses.
-
metadata: optional unknownMetadata filter for the responses. This is a query parameter used to select responses.
-
model: optional stringThe name of the model to find responses for. This is a query parameter used to select responses.
-
reasoning_effort: optional ReasoningEffortConstrains effort on reasoning for reasoning models. Currently supported values are
none,minimal,low,medium,high, andxhigh. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.gpt-5.1defaults tonone, which does not perform reasoning. The supported reasoning values forgpt-5.1arenone,low,medium, andhigh. Tool calls are supported for all reasoning values in gpt-5.1.- All models before
gpt-5.1default tomediumreasoning effort, and do not supportnone. - The
gpt-5-promodel defaults to (and only supports)highreasoning effort. xhighis supported for all models aftergpt-5.1-codex-max.
-
temperature: optional numberSampling temperature. This is a query parameter used to select responses.
-
tools: optional array of stringList of tool names. This is a query parameter used to select responses.
-
top_p: optional numberNucleus sampling parameter. This is a query parameter used to select responses.
-
users: optional array of stringList of user identifiers. This is a query parameter used to select responses.
-
-
-
type: "responses"The type of run data source. Always
responses."responses"
-
input_messages: optional object { template, type } or object { item_reference, type }Used when sampling from a model. Dictates the structure of the messages passed into the model. Can either be a reference to a prebuilt trajectory (ie,
item.input_trajectory), or a template with variable references to theitemnamespace.-
InputMessagesTemplate object { template, type }-
template: array of object { content, role } or object { content, role, type }A list of chat messages forming the prompt or context. May include variable references to the
itemnamespace, ie {{item.name}}.-
ChatMessage object { content, role }-
content: stringThe content of the message.
-
role: stringThe role of the message (e.g. "system", "assistant", "user").
-
-
EvalMessageObject object { content, role, type }A message input to the model with a role indicating instruction following hierarchy. Instructions given with the
developerorsystemrole take precedence over instructions given with theuserrole. Messages with theassistantrole are presumed to have been generated by the model in previous interactions.-
content: string or ResponseInputText or object { text, type } or 3 moreInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.
-
TextInput = stringA text input to the model.
-
ResponseInputText object { text, type }A text input to the model.
-
OutputText object { text, type }A text output from the model.
-
text: stringThe text output from the model.
-
type: "output_text"The type of the output text. Always
output_text."output_text"
-
-
InputImage object { image_url, type, detail }An image input block used within EvalItem content arrays.
-
image_url: stringThe URL of the image input.
-
type: "input_image"The type of the image input. Always
input_image."input_image"
-
detail: optional stringThe detail level of the image to be sent to the model. One of
high,low, orauto. Defaults toauto.
-
-
ResponseInputAudio object { input_audio, type }An audio input to the model.
-
GraderInputs = array of string or ResponseInputText or object { text, type } or 2 moreA list of inputs, each of which may be either an input text, output text, input image, or input audio object.
-
-
role: "user" or "assistant" or "system" or "developer"The role of the message input. One of
user,assistant,system, ordeveloper.-
"user" -
"assistant" -
"system" -
"developer"
-
-
type: optional "message"The type of the message input. Always
message."message"
-
-
-
type: "template"The type of input messages. Always
template."template"
-
-
InputMessagesItemReference object { item_reference, type }-
item_reference: stringA reference to a variable in the
itemnamespace. Ie, "item.name" -
type: "item_reference"The type of input messages. Always
item_reference."item_reference"
-
-
-
model: optional stringThe name of the model to use for generating completions (e.g. "o3-mini").
-
sampling_params: optional object { max_completion_tokens, reasoning_effort, seed, 4 more }-
max_completion_tokens: optional numberThe maximum number of tokens in the generated output.
-
reasoning_effort: optional ReasoningEffortConstrains effort on reasoning for reasoning models. Currently supported values are
none,minimal,low,medium,high, andxhigh. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.gpt-5.1defaults tonone, which does not perform reasoning. The supported reasoning values forgpt-5.1arenone,low,medium, andhigh. Tool calls are supported for all reasoning values in gpt-5.1.- All models before
gpt-5.1default tomediumreasoning effort, and do not supportnone. - The
gpt-5-promodel defaults to (and only supports)highreasoning effort. xhighis supported for all models aftergpt-5.1-codex-max.
-
seed: optional numberA seed value to initialize the randomness, during sampling.
-
temperature: optional numberA higher temperature increases randomness in the outputs.
-
text: optional object { format }Configuration options for a text response from the model. Can be plain text or structured JSON data. Learn more:
-
format: optional ResponseFormatTextConfigAn object specifying the format that the model must output.
Configuring
{ "type": "json_schema" }enables Structured Outputs, which ensures the model will match your supplied JSON schema. Learn more in the Structured Outputs guide.The default format is
{ "type": "text" }with no additional options.Not recommended for gpt-4o and newer models:
Setting to
{ "type": "json_object" }enables the older JSON mode, which ensures the message the model generates is valid JSON. Usingjson_schemais preferred for models that support it.-
ResponseFormatText object { type }Default response format. Used to generate text responses.
-
ResponseFormatTextJSONSchemaConfig object { name, schema, type, 2 more }JSON Schema response format. Used to generate structured JSON responses. Learn more about Structured Outputs.
-
name: stringThe name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.
-
schema: map[unknown]The schema for the response format, described as a JSON Schema object. Learn how to build JSON schemas here.
-
type: "json_schema"The type of response format being defined. Always
json_schema."json_schema"
-
description: optional stringA description of what the response format is for, used by the model to determine how to respond in the format.
-
strict: optional booleanWhether to enable strict schema adherence when generating the output. If set to true, the model will always follow the exact schema defined in the
schemafield. Only a subset of JSON Schema is supported whenstrictistrue. To learn more, read the Structured Outputs guide.
-
-
ResponseFormatJSONObject object { type }JSON object response format. An older method of generating JSON responses. Using
json_schemais recommended for models that support it. Note that the model will not generate JSON without a system or user message instructing it to do so.
-
-
tools: optional array of object { name, parameters, strict, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 moreAn array of tools the model may call while generating a response. You can specify which tool to use by setting the
tool_choiceparameter.The two categories of tools you can provide the model are:
-
Built-in tools: Tools that are provided by OpenAI that extend the model's capabilities, like web search or file search. Learn more about built-in tools.
-
Function calls (custom tools): Functions that are defined by you, enabling the model to call your own code. Learn more about function calling.
-
Function object { name, parameters, strict, 3 more }Defines a function in your own code the model can choose to call. Learn more about function calling.
-
name: stringThe name of the function to call.
-
parameters: map[unknown]A JSON schema object describing the parameters of the function.
-
strict: booleanWhether to enforce strict parameter validation. Default
true. -
type: "function"The type of the function tool. Always
function."function"
-
defer_loading: optional booleanWhether this function is deferred and loaded via tool search.
-
description: optional stringA description of the function. Used by the model to determine whether or not to call the function.
-
-
FileSearch object { type, vector_store_ids, filters, 2 more }A tool that searches for relevant content from uploaded files. Learn more about the file search tool.
-
type: "file_search"The type of the file search tool. Always
file_search."file_search"
-
vector_store_ids: array of stringThe IDs of the vector stores to search.
-
filters: optional ComparisonFilter or CompoundFilterA filter to apply.
-
ComparisonFilter object { key, type, value }A filter used to compare a specified attribute key to a given value using a defined comparison operation.
-
key: stringThe key to compare against the value.
-
type: "eq" or "ne" or "gt" or 5 moreSpecifies the comparison operator:
eq,ne,gt,gte,lt,lte,in,nin.-
eq: equals -
ne: not equal -
gt: greater than -
gte: greater than or equal -
lt: less than -
lte: less than or equal -
in: in -
nin: not in -
"eq" -
"ne" -
"gt" -
"gte" -
"lt" -
"lte" -
"in" -
"nin"
-
-
value: string or number or boolean or array of string or numberThe value to compare against the attribute key; supports string, number, or boolean types.
-
string -
number -
boolean -
array of string or number-
string -
number
-
-
-
-
CompoundFilter object { filters, type }Combine multiple filters using
andoror.-
filters: array of ComparisonFilter or unknownArray of filters to combine. Items can be
ComparisonFilterorCompoundFilter.-
ComparisonFilter object { key, type, value }A filter used to compare a specified attribute key to a given value using a defined comparison operation.
-
unknown
-
-
type: "and" or "or"Type of operation:
andoror.-
"and" -
"or"
-
-
-
-
max_num_results: optional numberThe maximum number of results to return. This number should be between 1 and 50 inclusive.
-
ranking_options: optional object { hybrid_search, ranker, score_threshold }Ranking options for search.
-
hybrid_search: optional object { embedding_weight, text_weight }Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.
-
embedding_weight: numberThe weight of the embedding in the reciprocal ranking fusion.
-
text_weight: numberThe weight of the text in the reciprocal ranking fusion.
-
-
ranker: optional "auto" or "default-2024-11-15"The ranker to use for the file search.
-
"auto" -
"default-2024-11-15"
-
-
score_threshold: optional numberThe score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results.
-
-
-
Computer object { type }A tool that controls a virtual computer. Learn more about the computer tool.
-
type: "computer"The type of the computer tool. Always
computer."computer"
-
-
ComputerUsePreview object { display_height, display_width, environment, type }A tool that controls a virtual computer. Learn more about the computer tool.
-
display_height: numberThe height of the computer display.
-
display_width: numberThe width of the computer display.
-
environment: "windows" or "mac" or "linux" or 2 moreThe type of computer environment to control.
-
"windows" -
"mac" -
"linux" -
"ubuntu" -
"browser"
-
-
type: "computer_use_preview"The type of the computer use tool. Always
computer_use_preview."computer_use_preview"
-
-
WebSearch object { type, filters, search_context_size, user_location }Search the Internet for sources related to the prompt. Learn more about the web search tool.
-
type: "web_search" or "web_search_2025_08_26"The type of the web search tool. One of
web_searchorweb_search_2025_08_26.-
"web_search" -
"web_search_2025_08_26"
-
-
filters: optional object { allowed_domains }Filters for the search.
-
allowed_domains: optional array of stringAllowed domains for the search. If not provided, all domains are allowed. Subdomains of the provided domains are allowed as well.
Example:
["pubmed.ncbi.nlm.nih.gov"]
-
-
search_context_size: optional "low" or "medium" or "high"High level guidance for the amount of context window space to use for the search. One of
low,medium, orhigh.mediumis the default.-
"low" -
"medium" -
"high"
-
-
user_location: optional object { city, country, region, 2 more }The approximate location of the user.
-
city: optional stringFree text input for the city of the user, e.g.
San Francisco. -
country: optional stringThe two-letter ISO country code of the user, e.g.
US. -
region: optional stringFree text input for the region of the user, e.g.
California. -
timezone: optional stringThe IANA timezone of the user, e.g.
America/Los_Angeles. -
type: optional "approximate"The type of location approximation. Always
approximate."approximate"
-
-
-
Mcp object { server_label, type, allowed_tools, 8 more }Give the model access to additional tools via remote Model Context Protocol (MCP) servers. Learn more about MCP.
-
server_label: stringA label for this MCP server, used to identify it in tool calls.
-
type: "mcp"The type of the MCP tool. Always
mcp."mcp"
-
allowed_tools: optional array of string or object { read_only, tool_names }List of allowed tool names or a filter object.
-
McpAllowedTools = array of stringA string array of allowed tool names
-
McpToolFilter object { read_only, tool_names }A filter object to specify which tools are allowed.
-
read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an MCP server is annotated with
readOnlyHint, it will match this filter. -
tool_names: optional array of stringList of allowed tool names.
-
-
-
authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either with a custom MCP server URL or a service connector. Your application must handle the OAuth authorization flow and provide the token here.
-
connector_id: optional "connector_dropbox" or "connector_gmail" or "connector_googlecalendar" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of
server_url,connector_id, ortunnel_idmust be provided. Learn more about service connectors here.Currently supported
connector_idvalues are:-
Dropbox:
connector_dropbox -
Gmail:
connector_gmail -
Google Calendar:
connector_googlecalendar -
Google Drive:
connector_googledrive -
Microsoft Teams:
connector_microsoftteams -
Outlook Calendar:
connector_outlookcalendar -
Outlook Email:
connector_outlookemail -
SharePoint:
connector_sharepoint -
"connector_dropbox" -
"connector_gmail" -
"connector_googlecalendar" -
"connector_googledrive" -
"connector_microsoftteams" -
"connector_outlookcalendar" -
"connector_outlookemail" -
"connector_sharepoint"
-
-
defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.
-
headers: optional map[string]Optional HTTP headers to send to the MCP server. Use for authentication or other purposes.
-
require_approval: optional object { always, never } or "always" or "never"Specify which of the MCP server's tools require approval.
-
McpToolApprovalFilter object { always, never }Specify which of the MCP server's tools require approval. Can be
always,never, or a filter object associated with tools that require approval.-
always: optional object { read_only, tool_names }A filter object to specify which tools are allowed.
-
read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an MCP server is annotated with
readOnlyHint, it will match this filter. -
tool_names: optional array of stringList of allowed tool names.
-
-
never: optional object { read_only, tool_names }A filter object to specify which tools are allowed.
-
read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an MCP server is annotated with
readOnlyHint, it will match this filter. -
tool_names: optional array of stringList of allowed tool names.
-
-
-
McpToolApprovalSetting = "always" or "never"Specify a single approval policy for all tools. One of
alwaysornever. When set toalways, all tools will require approval. When set tonever, all tools will not require approval.-
"always" -
"never"
-
-
-
server_description: optional stringOptional description of the MCP server, used to provide more context.
-
server_url: optional stringThe URL for the MCP server. One of
server_url,connector_id, ortunnel_idmust be provided. -
tunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of
server_url,connector_id, ortunnel_idmust be provided.
-
-
CodeInterpreter object { container, type }A tool that runs Python code to help generate a response to a prompt.
-
container: string or object { type, file_ids, memory_limit, network_policy }The code interpreter container. Can be a container ID or an object that specifies uploaded file IDs to make available to your code, along with an optional
memory_limitsetting.-
stringThe container ID.
-
CodeInterpreterToolAuto object { type, file_ids, memory_limit, network_policy }Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.
-
type: "auto"Always
auto."auto"
-
file_ids: optional array of stringAn optional list of uploaded files to make available to your code.
-
memory_limit: optional "1g" or "4g" or "16g" or "64g"The memory limit for the code interpreter container.
-
"1g" -
"4g" -
"16g" -
"64g"
-
-
network_policy: optional ContainerNetworkPolicyDisabled or ContainerNetworkPolicyAllowlistNetwork access policy for the container.
-
ContainerNetworkPolicyDisabled object { type }-
type: "disabled"Disable outbound network access. Always
disabled."disabled"
-
-
ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }-
allowed_domains: array of stringA list of allowed domains when type is
allowlist. -
type: "allowlist"Allow outbound network access only to specified domains. Always
allowlist."allowlist"
-
domain_secrets: optional array of ContainerNetworkPolicyDomainSecretOptional domain-scoped secrets for allowlisted domains.
-
domain: stringThe domain associated with the secret.
-
name: stringThe name of the secret to inject for the domain.
-
value: stringThe secret value to inject for the domain.
-
-
-
-
-
-
type: "code_interpreter"The type of the code interpreter tool. Always
code_interpreter."code_interpreter"
-
-
ImageGeneration object { type, action, background, 9 more }A tool that generates images using the GPT image models.
-
type: "image_generation"The type of the image generation tool. Always
image_generation."image_generation"
-
action: optional "generate" or "edit" or "auto"Whether to generate a new image or edit an existing image. Default:
auto.-
"generate" -
"edit" -
"auto"
-
-
background: optional "transparent" or "opaque" or "auto"Background type for the generated image. One of
transparent,opaque, orauto. Default:auto.-
"transparent" -
"opaque" -
"auto"
-
-
input_fidelity: optional "high" or "low"Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for
gpt-image-1andgpt-image-1.5and later models, unsupported forgpt-image-1-mini. Supportshighandlow. Defaults tolow.-
"high" -
"low"
-
-
input_image_mask: optional object { file_id, image_url }Optional mask for inpainting. Contains
image_url(string, optional) andfile_id(string, optional).-
file_id: optional stringFile ID for the mask image.
-
image_url: optional stringBase64-encoded mask image.
-
-
model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"The image generation model to use. Default:
gpt-image-1.-
string -
"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"The image generation model to use. Default:
gpt-image-1.-
"gpt-image-1" -
"gpt-image-1-mini" -
"gpt-image-1.5"
-
-
-
moderation: optional "auto" or "low"Moderation level for the generated image. Default:
auto.-
"auto" -
"low"
-
-
output_compression: optional numberCompression level for the output image. Default: 100.
-
output_format: optional "png" or "webp" or "jpeg"The output format of the generated image. One of
png,webp, orjpeg. Default:png.-
"png" -
"webp" -
"jpeg"
-
-
partial_images: optional numberNumber of partial images to generate in streaming mode, from 0 (default value) to 3.
-
quality: optional "low" or "medium" or "high" or "auto"The quality of the generated image. One of
low,medium,high, orauto. Default:auto.-
"low" -
"medium" -
"high" -
"auto"
-
-
size: optional string or "1024x1024" or "1024x1536" or "1536x1024" or "auto"The size of the generated images. For
gpt-image-2andgpt-image-2-2026-04-21, arbitrary resolutions are supported asWIDTHxHEIGHTstrings, for example1536x864. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above2560x1440are experimental, and the maximum supported resolution is3840x2160. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes1024x1024,1536x1024, and1024x1536are supported by the GPT image models;autois supported for models that allow automatic sizing. Fordall-e-2, use one of256x256,512x512, or1024x1024. Fordall-e-3, use one of1024x1024,1792x1024, or1024x1792.-
string -
"1024x1024" or "1024x1536" or "1536x1024" or "auto"The size of the generated images. For
gpt-image-2andgpt-image-2-2026-04-21, arbitrary resolutions are supported asWIDTHxHEIGHTstrings, for example1536x864. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above2560x1440are experimental, and the maximum supported resolution is3840x2160. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes1024x1024,1536x1024, and1024x1536are supported by the GPT image models;autois supported for models that allow automatic sizing. Fordall-e-2, use one of256x256,512x512, or1024x1024. Fordall-e-3, use one of1024x1024,1792x1024, or1024x1792.-
"1024x1024" -
"1024x1536" -
"1536x1024" -
"auto"
-
-
-
-
LocalShell object { type }A tool that allows the model to execute shell commands in a local environment.
-
type: "local_shell"The type of the local shell tool. Always
local_shell."local_shell"
-
-
Shell object { type, environment }A tool that allows the model to execute shell commands.
-
type: "shell"The type of the shell tool. Always
shell."shell"
-
environment: optional ContainerAuto or LocalEnvironment or ContainerReference-
ContainerAuto object { type, file_ids, memory_limit, 2 more }-
type: "container_auto"Automatically creates a container for this request
"container_auto"
-
file_ids: optional array of stringAn optional list of uploaded files to make available to your code.
-
memory_limit: optional "1g" or "4g" or "16g" or "64g"The memory limit for the container.
-
"1g" -
"4g" -
"16g" -
"64g"
-
-
network_policy: optional ContainerNetworkPolicyDisabled or ContainerNetworkPolicyAllowlistNetwork access policy for the container.
-
ContainerNetworkPolicyDisabled object { type } -
ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }
-
-
skills: optional array of SkillReference or InlineSkillAn optional list of skills referenced by id or inline data.
-
SkillReference object { skill_id, type, version }-
skill_id: stringThe ID of the referenced skill.
-
type: "skill_reference"References a skill created with the /v1/skills endpoint.
"skill_reference"
-
version: optional stringOptional skill version. Use a positive integer or 'latest'. Omit for default.
-
-
InlineSkill object { description, name, source, type }-
description: stringThe description of the skill.
-
name: stringThe name of the skill.
-
source: InlineSkillSourceInline skill payload
-
data: stringBase64-encoded skill zip bundle.
-
media_type: "application/zip"The media type of the inline skill payload. Must be
application/zip."application/zip"
-
type: "base64"The type of the inline skill source. Must be
base64."base64"
-
-
type: "inline"Defines an inline skill for this request.
"inline"
-
-
-
-
LocalEnvironment object { type, skills }-
type: "local"Use a local computer environment.
"local"
-
skills: optional array of LocalSkillAn optional list of skills.
-
description: stringThe description of the skill.
-
name: stringThe name of the skill.
-
path: stringThe path to the directory containing the skill.
-
-
-
ContainerReference object { container_id, type }-
container_id: stringThe ID of the referenced container.
-
type: "container_reference"References a container created with the /v1/containers endpoint
"container_reference"
-
-
-
-
Custom object { name, type, defer_loading, 2 more }A custom tool that processes input using a specified format. Learn more about custom tools
-
name: stringThe name of the custom tool, used to identify it in tool calls.
-
type: "custom"The type of the custom tool. Always
custom."custom"
-
defer_loading: optional booleanWhether this tool should be deferred and discovered via tool search.
-
description: optional stringOptional description of the custom tool, used to provide more context.
-
format: optional CustomToolInputFormatThe input format for the custom tool. Default is unconstrained text.
-
Text object { type }Unconstrained free-form text.
-
type: "text"Unconstrained text format. Always
text."text"
-
-
Grammar object { definition, syntax, type }A grammar defined by the user.
-
definition: stringThe grammar definition.
-
syntax: "lark" or "regex"The syntax of the grammar definition. One of
larkorregex.-
"lark" -
"regex"
-
-
type: "grammar"Grammar format. Always
grammar."grammar"
-
-
-
-
Namespace object { description, name, tools, type }Groups function/custom tools under a shared namespace.
-
description: stringA description of the namespace shown to the model.
-
name: stringThe namespace name used in tool calls (for example,
crm). -
tools: array of object { name, type, defer_loading, 3 more } or object { name, type, defer_loading, 2 more }The function/custom tools available inside this namespace.
-
Function object { name, type, defer_loading, 3 more }-
name: string -
type: "function""function"
-
defer_loading: optional booleanWhether this function should be deferred and discovered via tool search.
-
description: optional string -
parameters: optional unknown -
strict: optional boolean
-
-
Custom object { name, type, defer_loading, 2 more }A custom tool that processes input using a specified format. Learn more about custom tools
-
name: stringThe name of the custom tool, used to identify it in tool calls.
-
type: "custom"The type of the custom tool. Always
custom."custom"
-
defer_loading: optional booleanWhether this tool should be deferred and discovered via tool search.
-
description: optional stringOptional description of the custom tool, used to provide more context.
-
format: optional CustomToolInputFormatThe input format for the custom tool. Default is unconstrained text.
-
-
-
type: "namespace"The type of the tool. Always
namespace."namespace"
-
-
ToolSearch object { type, description, execution, parameters }Hosted or BYOT tool search configuration for deferred tools.
-
type: "tool_search"The type of the tool. Always
tool_search."tool_search"
-
description: optional stringDescription shown to the model for a client-executed tool search tool.
-
execution: optional "server" or "client"Whether tool search is executed by the server or by the client.
-
"server" -
"client"
-
-
parameters: optional unknownParameter schema for a client-executed tool search tool.
-
-
WebSearchPreview object { type, search_content_types, search_context_size, user_location }This tool searches the web for relevant results to use in a response. Learn more about the web search tool.
-
type: "web_search_preview" or "web_search_preview_2025_03_11"The type of the web search tool. One of
web_search_previeworweb_search_preview_2025_03_11.-
"web_search_preview" -
"web_search_preview_2025_03_11"
-
-
search_content_types: optional array of "text" or "image"-
"text" -
"image"
-
-
search_context_size: optional "low" or "medium" or "high"High level guidance for the amount of context window space to use for the search. One of
low,medium, orhigh.mediumis the default.-
"low" -
"medium" -
"high"
-
-
user_location: optional object { type, city, country, 2 more }The user's location.
-
type: "approximate"The type of location approximation. Always
approximate."approximate"
-
city: optional stringFree text input for the city of the user, e.g.
San Francisco. -
country: optional stringThe two-letter ISO country code of the user, e.g.
US. -
region: optional stringFree text input for the region of the user, e.g.
California. -
timezone: optional stringThe IANA timezone of the user, e.g.
America/Los_Angeles.
-
-
-
ApplyPatch object { type }Allows the assistant to create, delete, or update files using unified diffs.
-
type: "apply_patch"The type of the tool. Always
apply_patch."apply_patch"
-
-
-
top_p: optional numberAn alternative to temperature for nucleus sampling; 1.0 includes all tokens.
-
-
-
-
metadata: optional MetadataSet of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard.
Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.
-
name: optional stringThe name of the run.
Returns
-
id: stringUnique identifier for the evaluation run.
-
created_at: numberUnix timestamp (in seconds) when the evaluation run was created.
-
data_source: CreateEvalJSONLRunDataSource or CreateEvalCompletionsRunDataSource or object { source, type, input_messages, 2 more }Information about the run's data source.
-
CreateEvalJSONLRunDataSource object { source, type }A JsonlRunDataSource object with that specifies a JSONL file that matches the eval
-
source: object { content, type } or object { id, type }Determines what populates the
itemnamespace in the data source.-
EvalJSONLFileContentSource object { content, type }-
content: array of object { item, sample }The content of the jsonl file.
-
item: map[unknown] -
sample: optional map[unknown]
-
-
type: "file_content"The type of jsonl source. Always
file_content."file_content"
-
-
EvalJSONLFileIDSource object { id, type }-
id: stringThe identifier of the file.
-
type: "file_id"The type of jsonl source. Always
file_id."file_id"
-
-
-
type: "jsonl"The type of data source. Always
jsonl."jsonl"
-
-
CreateEvalCompletionsRunDataSource object { source, type, input_messages, 2 more }A CompletionsRunDataSource object describing a model sampling configuration.
-
source: object { content, type } or object { id, type } or object { type, created_after, created_before, 3 more }Determines what populates the
itemnamespace in this run's data source.-
EvalJSONLFileContentSource object { content, type }-
content: array of object { item, sample }The content of the jsonl file.
-
item: map[unknown] -
sample: optional map[unknown]
-
-
type: "file_content"The type of jsonl source. Always
file_content."file_content"
-
-
EvalJSONLFileIDSource object { id, type }-
id: stringThe identifier of the file.
-
type: "file_id"The type of jsonl source. Always
file_id."file_id"
-
-
StoredCompletionsRunDataSource object { type, created_after, created_before, 3 more }A StoredCompletionsRunDataSource configuration describing a set of filters
-
type: "stored_completions"The type of source. Always
stored_completions."stored_completions"
-
created_after: optional numberAn optional Unix timestamp to filter items created after this time.
-
created_before: optional numberAn optional Unix timestamp to filter items created before this time.
-
limit: optional numberAn optional maximum number of items to return.
-
metadata: optional MetadataSet of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard.
Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.
-
model: optional stringAn optional model to filter by (e.g., 'gpt-4o').
-
-
-
type: "completions"The type of run data source. Always
completions."completions"
-
input_messages: optional object { template, type } or object { item_reference, type }Used when sampling from a model. Dictates the structure of the messages passed into the model. Can either be a reference to a prebuilt trajectory (ie,
item.input_trajectory), or a template with variable references to theitemnamespace.-
TemplateInputMessages object { template, type }-
template: array of EasyInputMessage or object { content, role, type }A list of chat messages forming the prompt or context. May include variable references to the
itemnamespace, ie {{item.name}}.-
EasyInputMessage object { content, role, phase, type }A message input to the model with a role indicating instruction following hierarchy. Instructions given with the
developerorsystemrole take precedence over instructions given with theuserrole. Messages with theassistantrole are presumed to have been generated by the model in previous interactions.-
content: string or ResponseInputMessageContentListText, image, or audio input to the model, used to generate a response. Can also contain previous assistant responses.
-
TextInput = stringA text input to the model.
-
ResponseInputMessageContentList = array of ResponseInputContentA list of one or many input items to the model, containing different content types.
-
ResponseInputText object { text, type }A text input to the model.
-
text: stringThe text input to the model.
-
type: "input_text"The type of the input item. Always
input_text."input_text"
-
-
ResponseInputImage object { detail, type, file_id, image_url }An image input to the model. Learn about image inputs.
-
detail: "low" or "high" or "auto" or "original"The detail level of the image to be sent to the model. One of
high,low,auto, ororiginal. Defaults toauto.-
"low" -
"high" -
"auto" -
"original"
-
-
type: "input_image"The type of the input item. Always
input_image."input_image"
-
file_id: optional stringThe ID of the file to be sent to the model.
-
image_url: optional stringThe URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.
-
-
ResponseInputFile object { type, detail, file_data, 3 more }A file input to the model.
-
type: "input_file"The type of the input item. Always
input_file."input_file"
-
detail: optional "low" or "high"The detail level of the file to be sent to the model. Use
lowfor the default rendering behavior, orhighto render the file at higher quality. Defaults tolow.-
"low" -
"high"
-
-
file_data: optional stringThe content of the file to be sent to the model.
-
file_id: optional stringThe ID of the file to be sent to the model.
-
file_url: optional stringThe URL of the file to be sent to the model.
-
filename: optional stringThe name of the file to be sent to the model.
-
-
-
-
role: "user" or "assistant" or "system" or "developer"The role of the message input. One of
user,assistant,system, ordeveloper.-
"user" -
"assistant" -
"system" -
"developer"
-
-
phase: optional "commentary" or "final_answer"Labels an
assistantmessage as intermediate commentary (commentary) or the final answer (final_answer). For models likegpt-5.3-codexand beyond, when sending follow-up requests, preserve and resend phase on all assistant messages — dropping it can degrade performance. Not used for user messages.-
"commentary" -
"final_answer"
-
-
type: optional "message"The type of the message input. Always
message."message"
-
-
EvalMessageObject object { content, role, type }A message input to the model with a role indicating instruction following hierarchy. Instructions given with the
developerorsystemrole take precedence over instructions given with theuserrole. Messages with theassistantrole are presumed to have been generated by the model in previous interactions.-
content: string or ResponseInputText or object { text, type } or 3 moreInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.
-
TextInput = stringA text input to the model.
-
ResponseInputText object { text, type }A text input to the model.
-
OutputText object { text, type }A text output from the model.
-
text: stringThe text output from the model.
-
type: "output_text"The type of the output text. Always
output_text."output_text"
-
-
InputImage object { image_url, type, detail }An image input block used within EvalItem content arrays.
-
image_url: stringThe URL of the image input.
-
type: "input_image"The type of the image input. Always
input_image."input_image"
-
detail: optional stringThe detail level of the image to be sent to the model. One of
high,low, orauto. Defaults toauto.
-
-
ResponseInputAudio object { input_audio, type }An audio input to the model.
-
input_audio: object { data, format }-
data: stringBase64-encoded audio data.
-
format: "mp3" or "wav"The format of the audio data. Currently supported formats are
mp3andwav.-
"mp3" -
"wav"
-
-
-
type: "input_audio"The type of the input item. Always
input_audio."input_audio"
-
-
GraderInputs = array of string or ResponseInputText or object { text, type } or 2 moreA list of inputs, each of which may be either an input text, output text, input image, or input audio object.
-
TextInput = stringA text input to the model.
-
ResponseInputText object { text, type }A text input to the model.
-
OutputText object { text, type }A text output from the model.
-
text: stringThe text output from the model.
-
type: "output_text"The type of the output text. Always
output_text."output_text"
-
-
InputImage object { image_url, type, detail }An image input block used within EvalItem content arrays.
-
image_url: stringThe URL of the image input.
-
type: "input_image"The type of the image input. Always
input_image."input_image"
-
detail: optional stringThe detail level of the image to be sent to the model. One of
high,low, orauto. Defaults toauto.
-
-
ResponseInputAudio object { input_audio, type }An audio input to the model.
-
-
-
role: "user" or "assistant" or "system" or "developer"The role of the message input. One of
user,assistant,system, ordeveloper.-
"user" -
"assistant" -
"system" -
"developer"
-
-
type: optional "message"The type of the message input. Always
message."message"
-
-
-
type: "template"The type of input messages. Always
template."template"
-
-
ItemReferenceInputMessages object { item_reference, type }-
item_reference: stringA reference to a variable in the
itemnamespace. Ie, "item.input_trajectory" -
type: "item_reference"The type of input messages. Always
item_reference."item_reference"
-
-
-
model: optional stringThe name of the model to use for generating completions (e.g. "o3-mini").
-
sampling_params: optional object { max_completion_tokens, reasoning_effort, response_format, 4 more }-
max_completion_tokens: optional numberThe maximum number of tokens in the generated output.
-
reasoning_effort: optional ReasoningEffortConstrains effort on reasoning for reasoning models. Currently supported values are
none,minimal,low,medium,high, andxhigh. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.-
gpt-5.1defaults tonone, which does not perform reasoning. The supported reasoning values forgpt-5.1arenone,low,medium, andhigh. Tool calls are supported for all reasoning values in gpt-5.1. -
All models before
gpt-5.1default tomediumreasoning effort, and do not supportnone. -
The
gpt-5-promodel defaults to (and only supports)highreasoning effort. -
xhighis supported for all models aftergpt-5.1-codex-max. -
"none" -
"minimal" -
"low" -
"medium" -
"high" -
"xhigh"
-
-
response_format: optional ResponseFormatText or ResponseFormatJSONSchema or ResponseFormatJSONObjectAn object specifying the format that the model must output.
Setting to
{ "type": "json_schema", "json_schema": {...} }enables Structured Outputs which ensures the model will match your supplied JSON schema. Learn more in the Structured Outputs guide.Setting to
{ "type": "json_object" }enables the older JSON mode, which ensures the message the model generates is valid JSON. Usingjson_schemais preferred for models that support it.-
ResponseFormatText object { type }Default response format. Used to generate text responses.
-
type: "text"The type of response format being defined. Always
text."text"
-
-
ResponseFormatJSONSchema object { json_schema, type }JSON Schema response format. Used to generate structured JSON responses. Learn more about Structured Outputs.
-
json_schema: object { name, description, schema, strict }Structured Outputs configuration options, including a JSON Schema.
-
name: stringThe 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: optional stringA description of what the response format is for, used by the model to determine how to respond in the format.
-
schema: optional map[unknown]The schema for the response format, described as a JSON Schema object. Learn how to build JSON schemas here.
-
strict: optional booleanWhether to enable strict schema adherence when generating the output. If set to true, the model will always follow the exact schema defined in the
schemafield. Only a subset of JSON Schema is supported whenstrictistrue. To learn more, read the Structured Outputs guide.
-
-
type: "json_schema"The type of response format being defined. Always
json_schema."json_schema"
-
-
ResponseFormatJSONObject object { type }JSON object response format. An older method of generating JSON responses. Using
json_schemais recommended for models that support it. Note that the model will not generate JSON without a system or user message instructing it to do so.-
type: "json_object"The type of response format being defined. Always
json_object."json_object"
-
-
-
seed: optional numberA seed value to initialize the randomness, during sampling.
-
temperature: optional numberA higher temperature increases randomness in the outputs.
-
tools: optional array of ChatCompletionFunctionToolA list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported.
-
function: FunctionDefinition-
name: stringThe name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.
-
description: optional stringA description of what the function does, used by the model to choose when and how to call the function.
-
parameters: optional FunctionParametersThe parameters the functions accepts, described as a JSON Schema object. See the guide for examples, and the JSON Schema reference for documentation about the format.
Omitting
parametersdefines a function with an empty parameter list. -
strict: optional booleanWhether to enable strict schema adherence when generating the function call. If set to true, the model will follow the exact schema defined in the
parametersfield. Only a subset of JSON Schema is supported whenstrictistrue. Learn more about Structured Outputs in the function calling guide.
-
-
type: "function"The type of the tool. Currently, only
functionis supported."function"
-
-
top_p: optional numberAn alternative to temperature for nucleus sampling; 1.0 includes all tokens.
-
-
-
ResponsesRunDataSource object { source, type, input_messages, 2 more }A ResponsesRunDataSource object describing a model sampling configuration.
-
source: object { content, type } or object { id, type } or object { type, created_after, created_before, 8 more }Determines what populates the
itemnamespace in this run's data source.-
EvalJSONLFileContentSource object { content, type }-
content: array of object { item, sample }The content of the jsonl file.
-
item: map[unknown] -
sample: optional map[unknown]
-
-
type: "file_content"The type of jsonl source. Always
file_content."file_content"
-
-
EvalJSONLFileIDSource object { id, type }-
id: stringThe identifier of the file.
-
type: "file_id"The type of jsonl source. Always
file_id."file_id"
-
-
EvalResponsesSource object { type, created_after, created_before, 8 more }A EvalResponsesSource object describing a run data source configuration.
-
type: "responses"The type of run data source. Always
responses."responses"
-
created_after: optional numberOnly include items created after this timestamp (inclusive). This is a query parameter used to select responses.
-
created_before: optional numberOnly include items created before this timestamp (inclusive). This is a query parameter used to select responses.
-
instructions_search: optional stringOptional string to search the 'instructions' field. This is a query parameter used to select responses.
-
metadata: optional unknownMetadata filter for the responses. This is a query parameter used to select responses.
-
model: optional stringThe name of the model to find responses for. This is a query parameter used to select responses.
-
reasoning_effort: optional ReasoningEffortConstrains effort on reasoning for reasoning models. Currently supported values are
none,minimal,low,medium,high, andxhigh. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.gpt-5.1defaults tonone, which does not perform reasoning. The supported reasoning values forgpt-5.1arenone,low,medium, andhigh. Tool calls are supported for all reasoning values in gpt-5.1.- All models before
gpt-5.1default tomediumreasoning effort, and do not supportnone. - The
gpt-5-promodel defaults to (and only supports)highreasoning effort. xhighis supported for all models aftergpt-5.1-codex-max.
-
temperature: optional numberSampling temperature. This is a query parameter used to select responses.
-
tools: optional array of stringList of tool names. This is a query parameter used to select responses.
-
top_p: optional numberNucleus sampling parameter. This is a query parameter used to select responses.
-
users: optional array of stringList of user identifiers. This is a query parameter used to select responses.
-
-
-
type: "responses"The type of run data source. Always
responses."responses"
-
input_messages: optional object { template, type } or object { item_reference, type }Used when sampling from a model. Dictates the structure of the messages passed into the model. Can either be a reference to a prebuilt trajectory (ie,
item.input_trajectory), or a template with variable references to theitemnamespace.-
InputMessagesTemplate object { template, type }-
template: array of object { content, role } or object { content, role, type }A list of chat messages forming the prompt or context. May include variable references to the
itemnamespace, ie {{item.name}}.-
ChatMessage object { content, role }-
content: stringThe content of the message.
-
role: stringThe role of the message (e.g. "system", "assistant", "user").
-
-
EvalMessageObject object { content, role, type }A message input to the model with a role indicating instruction following hierarchy. Instructions given with the
developerorsystemrole take precedence over instructions given with theuserrole. Messages with theassistantrole are presumed to have been generated by the model in previous interactions.-
content: string or ResponseInputText or object { text, type } or 3 moreInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.
-
TextInput = stringA text input to the model.
-
ResponseInputText object { text, type }A text input to the model.
-
OutputText object { text, type }A text output from the model.
-
text: stringThe text output from the model.
-
type: "output_text"The type of the output text. Always
output_text."output_text"
-
-
InputImage object { image_url, type, detail }An image input block used within EvalItem content arrays.
-
image_url: stringThe URL of the image input.
-
type: "input_image"The type of the image input. Always
input_image."input_image"
-
detail: optional stringThe detail level of the image to be sent to the model. One of
high,low, orauto. Defaults toauto.
-
-
ResponseInputAudio object { input_audio, type }An audio input to the model.
-
GraderInputs = array of string or ResponseInputText or object { text, type } or 2 moreA list of inputs, each of which may be either an input text, output text, input image, or input audio object.
-
-
role: "user" or "assistant" or "system" or "developer"The role of the message input. One of
user,assistant,system, ordeveloper.-
"user" -
"assistant" -
"system" -
"developer"
-
-
type: optional "message"The type of the message input. Always
message."message"
-
-
-
type: "template"The type of input messages. Always
template."template"
-
-
InputMessagesItemReference object { item_reference, type }-
item_reference: stringA reference to a variable in the
itemnamespace. Ie, "item.name" -
type: "item_reference"The type of input messages. Always
item_reference."item_reference"
-
-
-
model: optional stringThe name of the model to use for generating completions (e.g. "o3-mini").
-
sampling_params: optional object { max_completion_tokens, reasoning_effort, seed, 4 more }-
max_completion_tokens: optional numberThe maximum number of tokens in the generated output.
-
reasoning_effort: optional ReasoningEffortConstrains effort on reasoning for reasoning models. Currently supported values are
none,minimal,low,medium,high, andxhigh. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.gpt-5.1defaults tonone, which does not perform reasoning. The supported reasoning values forgpt-5.1arenone,low,medium, andhigh. Tool calls are supported for all reasoning values in gpt-5.1.- All models before
gpt-5.1default tomediumreasoning effort, and do not supportnone. - The
gpt-5-promodel defaults to (and only supports)highreasoning effort. xhighis supported for all models aftergpt-5.1-codex-max.
-
seed: optional numberA seed value to initialize the randomness, during sampling.
-
temperature: optional numberA higher temperature increases randomness in the outputs.
-
text: optional object { format }Configuration options for a text response from the model. Can be plain text or structured JSON data. Learn more:
-
format: optional ResponseFormatTextConfigAn object specifying the format that the model must output.
Configuring
{ "type": "json_schema" }enables Structured Outputs, which ensures the model will match your supplied JSON schema. Learn more in the Structured Outputs guide.The default format is
{ "type": "text" }with no additional options.Not recommended for gpt-4o and newer models:
Setting to
{ "type": "json_object" }enables the older JSON mode, which ensures the message the model generates is valid JSON. Usingjson_schemais preferred for models that support it.-
ResponseFormatText object { type }Default response format. Used to generate text responses.
-
ResponseFormatTextJSONSchemaConfig object { name, schema, type, 2 more }JSON Schema response format. Used to generate structured JSON responses. Learn more about Structured Outputs.
-
name: stringThe name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.
-
schema: map[unknown]The schema for the response format, described as a JSON Schema object. Learn how to build JSON schemas here.
-
type: "json_schema"The type of response format being defined. Always
json_schema."json_schema"
-
description: optional stringA description of what the response format is for, used by the model to determine how to respond in the format.
-
strict: optional booleanWhether to enable strict schema adherence when generating the output. If set to true, the model will always follow the exact schema defined in the
schemafield. Only a subset of JSON Schema is supported whenstrictistrue. To learn more, read the Structured Outputs guide.
-
-
ResponseFormatJSONObject object { type }JSON object response format. An older method of generating JSON responses. Using
json_schemais recommended for models that support it. Note that the model will not generate JSON without a system or user message instructing it to do so.
-
-
tools: optional array of object { name, parameters, strict, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 moreAn array of tools the model may call while generating a response. You can specify which tool to use by setting the
tool_choiceparameter.The two categories of tools you can provide the model are:
-
Built-in tools: Tools that are provided by OpenAI that extend the model's capabilities, like web search or file search. Learn more about built-in tools.
-
Function calls (custom tools): Functions that are defined by you, enabling the model to call your own code. Learn more about function calling.
-
Function object { name, parameters, strict, 3 more }Defines a function in your own code the model can choose to call. Learn more about function calling.
-
name: stringThe name of the function to call.
-
parameters: map[unknown]A JSON schema object describing the parameters of the function.
-
strict: booleanWhether to enforce strict parameter validation. Default
true. -
type: "function"The type of the function tool. Always
function."function"
-
defer_loading: optional booleanWhether this function is deferred and loaded via tool search.
-
description: optional stringA description of the function. Used by the model to determine whether or not to call the function.
-
-
FileSearch object { type, vector_store_ids, filters, 2 more }A tool that searches for relevant content from uploaded files. Learn more about the file search tool.
-
type: "file_search"The type of the file search tool. Always
file_search."file_search"
-
vector_store_ids: array of stringThe IDs of the vector stores to search.
-
filters: optional ComparisonFilter or CompoundFilterA filter to apply.
-
ComparisonFilter object { key, type, value }A filter used to compare a specified attribute key to a given value using a defined comparison operation.
-
key: stringThe key to compare against the value.
-
type: "eq" or "ne" or "gt" or 5 moreSpecifies the comparison operator:
eq,ne,gt,gte,lt,lte,in,nin.-
eq: equals -
ne: not equal -
gt: greater than -
gte: greater than or equal -
lt: less than -
lte: less than or equal -
in: in -
nin: not in -
"eq" -
"ne" -
"gt" -
"gte" -
"lt" -
"lte" -
"in" -
"nin"
-
-
value: string or number or boolean or array of string or numberThe value to compare against the attribute key; supports string, number, or boolean types.
-
string -
number -
boolean -
array of string or number-
string -
number
-
-
-
-
CompoundFilter object { filters, type }Combine multiple filters using
andoror.-
filters: array of ComparisonFilter or unknownArray of filters to combine. Items can be
ComparisonFilterorCompoundFilter.-
ComparisonFilter object { key, type, value }A filter used to compare a specified attribute key to a given value using a defined comparison operation.
-
unknown
-
-
type: "and" or "or"Type of operation:
andoror.-
"and" -
"or"
-
-
-
-
max_num_results: optional numberThe maximum number of results to return. This number should be between 1 and 50 inclusive.
-
ranking_options: optional object { hybrid_search, ranker, score_threshold }Ranking options for search.
-
hybrid_search: optional object { embedding_weight, text_weight }Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.
-
embedding_weight: numberThe weight of the embedding in the reciprocal ranking fusion.
-
text_weight: numberThe weight of the text in the reciprocal ranking fusion.
-
-
ranker: optional "auto" or "default-2024-11-15"The ranker to use for the file search.
-
"auto" -
"default-2024-11-15"
-
-
score_threshold: optional numberThe score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results.
-
-
-
Computer object { type }A tool that controls a virtual computer. Learn more about the computer tool.
-
type: "computer"The type of the computer tool. Always
computer."computer"
-
-
ComputerUsePreview object { display_height, display_width, environment, type }A tool that controls a virtual computer. Learn more about the computer tool.
-
display_height: numberThe height of the computer display.
-
display_width: numberThe width of the computer display.
-
environment: "windows" or "mac" or "linux" or 2 moreThe type of computer environment to control.
-
"windows" -
"mac" -
"linux" -
"ubuntu" -
"browser"
-
-
type: "computer_use_preview"The type of the computer use tool. Always
computer_use_preview."computer_use_preview"
-
-
WebSearch object { type, filters, search_context_size, user_location }Search the Internet for sources related to the prompt. Learn more about the web search tool.
-
type: "web_search" or "web_search_2025_08_26"The type of the web search tool. One of
web_searchorweb_search_2025_08_26.-
"web_search" -
"web_search_2025_08_26"
-
-
filters: optional object { allowed_domains }Filters for the search.
-
allowed_domains: optional array of stringAllowed domains for the search. If not provided, all domains are allowed. Subdomains of the provided domains are allowed as well.
Example:
["pubmed.ncbi.nlm.nih.gov"]
-
-
search_context_size: optional "low" or "medium" or "high"High level guidance for the amount of context window space to use for the search. One of
low,medium, orhigh.mediumis the default.-
"low" -
"medium" -
"high"
-
-
user_location: optional object { city, country, region, 2 more }The approximate location of the user.
-
city: optional stringFree text input for the city of the user, e.g.
San Francisco. -
country: optional stringThe two-letter ISO country code of the user, e.g.
US. -
region: optional stringFree text input for the region of the user, e.g.
California. -
timezone: optional stringThe IANA timezone of the user, e.g.
America/Los_Angeles. -
type: optional "approximate"The type of location approximation. Always
approximate."approximate"
-
-
-
Mcp object { server_label, type, allowed_tools, 8 more }Give the model access to additional tools via remote Model Context Protocol (MCP) servers. Learn more about MCP.
-
server_label: stringA label for this MCP server, used to identify it in tool calls.
-
type: "mcp"The type of the MCP tool. Always
mcp."mcp"
-
allowed_tools: optional array of string or object { read_only, tool_names }List of allowed tool names or a filter object.
-
McpAllowedTools = array of stringA string array of allowed tool names
-
McpToolFilter object { read_only, tool_names }A filter object to specify which tools are allowed.
-
read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an MCP server is annotated with
readOnlyHint, it will match this filter. -
tool_names: optional array of stringList of allowed tool names.
-
-
-
authorization: optional stringAn OAuth access token that can be used with a remote MCP server, either with a custom MCP server URL or a service connector. Your application must handle the OAuth authorization flow and provide the token here.
-
connector_id: optional "connector_dropbox" or "connector_gmail" or "connector_googlecalendar" or 5 moreIdentifier for service connectors, like those available in ChatGPT. One of
server_url,connector_id, ortunnel_idmust be provided. Learn more about service connectors here.Currently supported
connector_idvalues are:-
Dropbox:
connector_dropbox -
Gmail:
connector_gmail -
Google Calendar:
connector_googlecalendar -
Google Drive:
connector_googledrive -
Microsoft Teams:
connector_microsoftteams -
Outlook Calendar:
connector_outlookcalendar -
Outlook Email:
connector_outlookemail -
SharePoint:
connector_sharepoint -
"connector_dropbox" -
"connector_gmail" -
"connector_googlecalendar" -
"connector_googledrive" -
"connector_microsoftteams" -
"connector_outlookcalendar" -
"connector_outlookemail" -
"connector_sharepoint"
-
-
defer_loading: optional booleanWhether this MCP tool is deferred and discovered via tool search.
-
headers: optional map[string]Optional HTTP headers to send to the MCP server. Use for authentication or other purposes.
-
require_approval: optional object { always, never } or "always" or "never"Specify which of the MCP server's tools require approval.
-
McpToolApprovalFilter object { always, never }Specify which of the MCP server's tools require approval. Can be
always,never, or a filter object associated with tools that require approval.-
always: optional object { read_only, tool_names }A filter object to specify which tools are allowed.
-
read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an MCP server is annotated with
readOnlyHint, it will match this filter. -
tool_names: optional array of stringList of allowed tool names.
-
-
never: optional object { read_only, tool_names }A filter object to specify which tools are allowed.
-
read_only: optional booleanIndicates whether or not a tool modifies data or is read-only. If an MCP server is annotated with
readOnlyHint, it will match this filter. -
tool_names: optional array of stringList of allowed tool names.
-
-
-
McpToolApprovalSetting = "always" or "never"Specify a single approval policy for all tools. One of
alwaysornever. When set toalways, all tools will require approval. When set tonever, all tools will not require approval.-
"always" -
"never"
-
-
-
server_description: optional stringOptional description of the MCP server, used to provide more context.
-
server_url: optional stringThe URL for the MCP server. One of
server_url,connector_id, ortunnel_idmust be provided. -
tunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of
server_url,connector_id, ortunnel_idmust be provided.
-
-
CodeInterpreter object { container, type }A tool that runs Python code to help generate a response to a prompt.
-
container: string or object { type, file_ids, memory_limit, network_policy }The code interpreter container. Can be a container ID or an object that specifies uploaded file IDs to make available to your code, along with an optional
memory_limitsetting.-
stringThe container ID.
-
CodeInterpreterToolAuto object { type, file_ids, memory_limit, network_policy }Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.
-
type: "auto"Always
auto."auto"
-
file_ids: optional array of stringAn optional list of uploaded files to make available to your code.
-
memory_limit: optional "1g" or "4g" or "16g" or "64g"The memory limit for the code interpreter container.
-
"1g" -
"4g" -
"16g" -
"64g"
-
-
network_policy: optional ContainerNetworkPolicyDisabled or ContainerNetworkPolicyAllowlistNetwork access policy for the container.
-
ContainerNetworkPolicyDisabled object { type }-
type: "disabled"Disable outbound network access. Always
disabled."disabled"
-
-
ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }-
allowed_domains: array of stringA list of allowed domains when type is
allowlist. -
type: "allowlist"Allow outbound network access only to specified domains. Always
allowlist."allowlist"
-
domain_secrets: optional array of ContainerNetworkPolicyDomainSecretOptional domain-scoped secrets for allowlisted domains.
-
domain: stringThe domain associated with the secret.
-
name: stringThe name of the secret to inject for the domain.
-
value: stringThe secret value to inject for the domain.
-
-
-
-
-
-
type: "code_interpreter"The type of the code interpreter tool. Always
code_interpreter."code_interpreter"
-
-
ImageGeneration object { type, action, background, 9 more }A tool that generates images using the GPT image models.
-
type: "image_generation"The type of the image generation tool. Always
image_generation."image_generation"
-
action: optional "generate" or "edit" or "auto"Whether to generate a new image or edit an existing image. Default:
auto.-
"generate" -
"edit" -
"auto"
-
-
background: optional "transparent" or "opaque" or "auto"Background type for the generated image. One of
transparent,opaque, orauto. Default:auto.-
"transparent" -
"opaque" -
"auto"
-
-
input_fidelity: optional "high" or "low"Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for
gpt-image-1andgpt-image-1.5and later models, unsupported forgpt-image-1-mini. Supportshighandlow. Defaults tolow.-
"high" -
"low"
-
-
input_image_mask: optional object { file_id, image_url }Optional mask for inpainting. Contains
image_url(string, optional) andfile_id(string, optional).-
file_id: optional stringFile ID for the mask image.
-
image_url: optional stringBase64-encoded mask image.
-
-
model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"The image generation model to use. Default:
gpt-image-1.-
string -
"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"The image generation model to use. Default:
gpt-image-1.-
"gpt-image-1" -
"gpt-image-1-mini" -
"gpt-image-1.5"
-
-
-
moderation: optional "auto" or "low"Moderation level for the generated image. Default:
auto.-
"auto" -
"low"
-
-
output_compression: optional numberCompression level for the output image. Default: 100.
-
output_format: optional "png" or "webp" or "jpeg"The output format of the generated image. One of
png,webp, orjpeg. Default:png.-
"png" -
"webp" -
"jpeg"
-
-
partial_images: optional numberNumber of partial images to generate in streaming mode, from 0 (default value) to 3.
-
quality: optional "low" or "medium" or "high" or "auto"The quality of the generated image. One of
low,medium,high, orauto. Default:auto.-
"low" -
"medium" -
"high" -
"auto"
-
-
size: optional string or "1024x1024" or "1024x1536" or "1536x1024" or "auto"The size of the generated images. For
gpt-image-2andgpt-image-2-2026-04-21, arbitrary resolutions are supported asWIDTHxHEIGHTstrings, for example1536x864. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above2560x1440are experimental, and the maximum supported resolution is3840x2160. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes1024x1024,1536x1024, and1024x1536are supported by the GPT image models;autois supported for models that allow automatic sizing. Fordall-e-2, use one of256x256,512x512, or1024x1024. Fordall-e-3, use one of1024x1024,1792x1024, or1024x1792.-
string -
"1024x1024" or "1024x1536" or "1536x1024" or "auto"The size of the generated images. For
gpt-image-2andgpt-image-2-2026-04-21, arbitrary resolutions are supported asWIDTHxHEIGHTstrings, for example1536x864. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above2560x1440are experimental, and the maximum supported resolution is3840x2160. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes1024x1024,1536x1024, and1024x1536are supported by the GPT image models;autois supported for models that allow automatic sizing. Fordall-e-2, use one of256x256,512x512, or1024x1024. Fordall-e-3, use one of1024x1024,1792x1024, or1024x1792.-
"1024x1024" -
"1024x1536" -
"1536x1024" -
"auto"
-
-
-
-
LocalShell object { type }A tool that allows the model to execute shell commands in a local environment.
-
type: "local_shell"The type of the local shell tool. Always
local_shell."local_shell"
-
-
Shell object { type, environment }A tool that allows the model to execute shell commands.
-
type: "shell"The type of the shell tool. Always
shell."shell"
-
environment: optional ContainerAuto or LocalEnvironment or ContainerReference-
ContainerAuto object { type, file_ids, memory_limit, 2 more }-
type: "container_auto"Automatically creates a container for this request
"container_auto"
-
file_ids: optional array of stringAn optional list of uploaded files to make available to your code.
-
memory_limit: optional "1g" or "4g" or "16g" or "64g"The memory limit for the container.
-
"1g" -
"4g" -
"16g" -
"64g"
-
-
network_policy: optional ContainerNetworkPolicyDisabled or ContainerNetworkPolicyAllowlistNetwork access policy for the container.
-
ContainerNetworkPolicyDisabled object { type } -
ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }
-
-
skills: optional array of SkillReference or InlineSkillAn optional list of skills referenced by id or inline data.
-
SkillReference object { skill_id, type, version }-
skill_id: stringThe ID of the referenced skill.
-
type: "skill_reference"References a skill created with the /v1/skills endpoint.
"skill_reference"
-
version: optional stringOptional skill version. Use a positive integer or 'latest'. Omit for default.
-
-
InlineSkill object { description, name, source, type }-
description: stringThe description of the skill.
-
name: stringThe name of the skill.
-
source: InlineSkillSourceInline skill payload
-
data: stringBase64-encoded skill zip bundle.
-
media_type: "application/zip"The media type of the inline skill payload. Must be
application/zip."application/zip"
-
type: "base64"The type of the inline skill source. Must be
base64."base64"
-
-
type: "inline"Defines an inline skill for this request.
"inline"
-
-
-
-
LocalEnvironment object { type, skills }-
type: "local"Use a local computer environment.
"local"
-
skills: optional array of LocalSkillAn optional list of skills.
-
description: stringThe description of the skill.
-
name: stringThe name of the skill.
-
path: stringThe path to the directory containing the skill.
-
-
-
ContainerReference object { container_id, type }-
container_id: stringThe ID of the referenced container.
-
type: "container_reference"References a container created with the /v1/containers endpoint
"container_reference"
-
-
-
-
Custom object { name, type, defer_loading, 2 more }A custom tool that processes input using a specified format. Learn more about custom tools
-
name: stringThe name of the custom tool, used to identify it in tool calls.
-
type: "custom"The type of the custom tool. Always
custom."custom"
-
defer_loading: optional booleanWhether this tool should be deferred and discovered via tool search.
-
description: optional stringOptional description of the custom tool, used to provide more context.
-
format: optional CustomToolInputFormatThe input format for the custom tool. Default is unconstrained text.
-
Text object { type }Unconstrained free-form text.
-
type: "text"Unconstrained text format. Always
text."text"
-
-
Grammar object { definition, syntax, type }A grammar defined by the user.
-
definition: stringThe grammar definition.
-
syntax: "lark" or "regex"The syntax of the grammar definition. One of
larkorregex.-
"lark" -
"regex"
-
-
type: "grammar"Grammar format. Always
grammar."grammar"
-
-
-
-
Namespace object { description, name, tools, type }Groups function/custom tools under a shared namespace.
-
description: stringA description of the namespace shown to the model.
-
name: stringThe namespace name used in tool calls (for example,
crm). -
tools: array of object { name, type, defer_loading, 3 more } or object { name, type, defer_loading, 2 more }The function/custom tools available inside this namespace.
-
Function object { name, type, defer_loading, 3 more }-
name: string -
type: "function""function"
-
defer_loading: optional booleanWhether this function should be deferred and discovered via tool search.
-
description: optional string -
parameters: optional unknown -
strict: optional boolean
-
-
Custom object { name, type, defer_loading, 2 more }A custom tool that processes input using a specified format. Learn more about custom tools
-
name: stringThe name of the custom tool, used to identify it in tool calls.
-
type: "custom"The type of the custom tool. Always
custom."custom"
-
defer_loading: optional booleanWhether this tool should be deferred and discovered via tool search.
-
description: optional stringOptional description of the custom tool, used to provide more context.
-
format: optional CustomToolInputFormatThe input format for the custom tool. Default is unconstrained text.
-
-
-
type: "namespace"The type of the tool. Always
namespace."namespace"
-
-
ToolSearch object { type, description, execution, parameters }Hosted or BYOT tool search configuration for deferred tools.
-
type: "tool_search"The type of the tool. Always
tool_search."tool_search"
-
description: optional stringDescription shown to the model for a client-executed tool search tool.
-
execution: optional "server" or "client"Whether tool search is executed by the server or by the client.
-
"server" -
"client"
-
-
parameters: optional unknownParameter schema for a client-executed tool search tool.
-
-
WebSearchPreview object { type, search_content_types, search_context_size, user_location }This tool searches the web for relevant results to use in a response. Learn more about the web search tool.
-
type: "web_search_preview" or "web_search_preview_2025_03_11"The type of the web search tool. One of
web_search_previeworweb_search_preview_2025_03_11.-
"web_search_preview" -
"web_search_preview_2025_03_11"
-
-
search_content_types: optional array of "text" or "image"-
"text" -
"image"
-
-
search_context_size: optional "low" or "medium" or "high"High level guidance for the amount of context window space to use for the search. One of
low,medium, orhigh.mediumis the default.-
"low" -
"medium" -
"high"
-
-
user_location: optional object { type, city, country, 2 more }The user's location.
-
type: "approximate"The type of location approximation. Always
approximate."approximate"
-
city: optional stringFree text input for the city of the user, e.g.
San Francisco. -
country: optional stringThe two-letter ISO country code of the user, e.g.
US. -
region: optional stringFree text input for the region of the user, e.g.
California. -
timezone: optional stringThe IANA timezone of the user, e.g.
America/Los_Angeles.
-
-
-
ApplyPatch object { type }Allows the assistant to create, delete, or update files using unified diffs.
-
type: "apply_patch"The type of the tool. Always
apply_patch."apply_patch"
-
-
-
top_p: optional numberAn alternative to temperature for nucleus sampling; 1.0 includes all tokens.
-
-
-
-
error: EvalAPIErrorAn object representing an error response from the Eval API.
-
code: stringThe error code.
-
message: stringThe error message.
-
-
eval_id: stringThe identifier of the associated evaluation.
-
metadata: MetadataSet of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard.
Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.
-
model: stringThe model that is evaluated, if applicable.
-
name: stringThe name of the evaluation run.
-
object: "eval.run"The type of the object. Always "eval.run".
"eval.run"
-
per_model_usage: array of object { cached_tokens, completion_tokens, invocation_count, 3 more }Usage statistics for each model during the evaluation run.
-
cached_tokens: numberThe number of tokens retrieved from cache.
-
completion_tokens: numberThe number of completion tokens generated.
-
invocation_count: numberThe number of invocations.
-
model_name: stringThe name of the model.
-
prompt_tokens: numberThe number of prompt tokens used.
-
total_tokens: numberThe total number of tokens used.
-
-
per_testing_criteria_results: array of object { failed, passed, testing_criteria }Results per testing criteria applied during the evaluation run.
-
failed: numberNumber of tests failed for this criteria.
-
passed: numberNumber of tests passed for this criteria.
-
testing_criteria: stringA description of the testing criteria.
-
-
report_url: stringThe URL to the rendered evaluation run report on the UI dashboard.
-
result_counts: object { errored, failed, passed, total }Counters summarizing the outcomes of the evaluation run.
-
errored: numberNumber of output items that resulted in an error.
-
failed: numberNumber of output items that failed to pass the evaluation.
-
passed: numberNumber of output items that passed the evaluation.
-
total: numberTotal number of executed output items.
-
-
status: stringThe status of the evaluation run.
Example
curl https://api.openai.com/v1/evals/$EVAL_ID/runs \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-d '{
"data_source": {
"source": {
"content": [
{
"item": {
"foo": "bar"
}
}
],
"type": "file_content"
},
"type": "jsonl"
}
}'
Response
{
"id": "id",
"created_at": 0,
"data_source": {
"source": {
"content": [
{
"item": {
"foo": "bar"
},
"sample": {
"foo": "bar"
}
}
],
"type": "file_content"
},
"type": "jsonl"
},
"error": {
"code": "code",
"message": "message"
},
"eval_id": "eval_id",
"metadata": {
"foo": "string"
},
"model": "model",
"name": "name",
"object": "eval.run",
"per_model_usage": [
{
"cached_tokens": 0,
"completion_tokens": 0,
"invocation_count": 0,
"model_name": "model_name",
"prompt_tokens": 0,
"total_tokens": 0
}
],
"per_testing_criteria_results": [
{
"failed": 0,
"passed": 0,
"testing_criteria": "testing_criteria"
}
],
"report_url": "https://example.com",
"result_counts": {
"errored": 0,
"failed": 0,
"passed": 0,
"total": 0
},
"status": "status"
}
Example
curl https://api.openai.com/v1/evals/eval_67e579652b548190aaa83ada4b125f47/runs \
-X POST \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"gpt-4o-mini","data_source":{"type":"completions","input_messages":{"type":"template","template":[{"role":"developer","content":"Categorize a given news headline into one of the following topics: Technology, Markets, World, Business, or Sports.\n\n# Steps\n\n1. Analyze the content of the news headline to understand its primary focus.\n2. Extract the subject matter, identifying any key indicators or keywords.\n3. Use the identified indicators to determine the most suitable category out of the five options: Technology, Markets, World, Business, or Sports.\n4. Ensure only one category is selected per headline.\n\n# Output Format\n\nRespond with the chosen category as a single word. For instance: \"Technology\", \"Markets\", \"World\", \"Business\", or \"Sports\".\n\n# Examples\n\n**Input**: \"Apple Unveils New iPhone Model, Featuring Advanced AI Features\" \n**Output**: \"Technology\"\n\n**Input**: \"Global Stocks Mixed as Investors Await Central Bank Decisions\" \n**Output**: \"Markets\"\n\n**Input**: \"War in Ukraine: Latest Updates on Negotiation Status\" \n**Output**: \"World\"\n\n**Input**: \"Microsoft in Talks to Acquire Gaming Company for $2 Billion\" \n**Output**: \"Business\"\n\n**Input**: \"Manchester United Secures Win in Premier League Football Match\" \n**Output**: \"Sports\" \n\n# Notes\n\n- If the headline appears to fit into more than one category, choose the most dominant theme.\n- Keywords or phrases such as \"stocks\", \"company acquisition\", \"match\", or technological brands can be good indicators for classification.\n"} , {"role":"user","content":"{{item.input}}"}]} ,"sampling_params":{"temperature":1,"max_completions_tokens":2048,"top_p":1,"seed":42},"model":"gpt-4o-mini","source":{"type":"file_content","content":[{"item":{"input":"Tech Company Launches Advanced Artificial Intelligence Platform","ground_truth":"Technology"}}]}}'
Response
{
"object": "eval.run",
"id": "evalrun_67e57965b480819094274e3a32235e4c",
"eval_id": "eval_67e579652b548190aaa83ada4b125f47",
"report_url": "https://platform.openai.com/evaluations/eval_67e579652b548190aaa83ada4b125f47&run_id=evalrun_67e57965b480819094274e3a32235e4c",
"status": "queued",
"model": "gpt-4o-mini",
"name": "gpt-4o-mini",
"created_at": 1743092069,
"result_counts": {
"total": 0,
"errored": 0,
"failed": 0,
"passed": 0
},
"per_model_usage": null,
"per_testing_criteria_results": null,
"data_source": {
"type": "completions",
"source": {
"type": "file_content",
"content": [
{
"item": {
"input": "Tech Company Launches Advanced Artificial Intelligence Platform",
"ground_truth": "Technology"
}
}
]
},
"input_messages": {
"type": "template",
"template": [
{
"type": "message",
"role": "developer",
"content": {
"type": "input_text",
"text": "Categorize a given news headline into one of the following topics: Technology, Markets, World, Business, or Sports.\n\n# Steps\n\n1. Analyze the content of the news headline to understand its primary focus.\n2. Extract the subject matter, identifying any key indicators or keywords.\n3. Use the identified indicators to determine the most suitable category out of the five options: Technology, Markets, World, Business, or Sports.\n4. Ensure only one category is selected per headline.\n\n# Output Format\n\nRespond with the chosen category as a single word. For instance: \"Technology\", \"Markets\", \"World\", \"Business\", or \"Sports\".\n\n# Examples\n\n**Input**: \"Apple Unveils New iPhone Model, Featuring Advanced AI Features\" \n**Output**: \"Technology\"\n\n**Input**: \"Global Stocks Mixed as Investors Await Central Bank Decisions\" \n**Output**: \"Markets\"\n\n**Input**: \"War in Ukraine: Latest Updates on Negotiation Status\" \n**Output**: \"World\"\n\n**Input**: \"Microsoft in Talks to Acquire Gaming Company for $2 Billion\" \n**Output**: \"Business\"\n\n**Input**: \"Manchester United Secures Win in Premier League Football Match\" \n**Output**: \"Sports\" \n\n# Notes\n\n- If the headline appears to fit into more than one category, choose the most dominant theme.\n- Keywords or phrases such as \"stocks\", \"company acquisition\", \"match\", or technological brands can be good indicators for classification.\n"
}
},
{
"type": "message",
"role": "user",
"content": {
"type": "input_text",
"text": "{{item.input}}"
}
}
]
},
"model": "gpt-4o-mini",
"sampling_params": {
"seed": 42,
"temperature": 1.0,
"top_p": 1.0,
"max_completions_tokens": 2048
}
},
"error": null,
"metadata": {}
}