--- url: "https://developers.openai.com/api/docs/api-reference/evals" titulek: "Evals | OpenAI API Reference" h1: "Evals" popis: "" jazyk: "en" kanonicka: "https://developers.openai.com/api/reference/resources/evals/" drobecky: ["path", "string"] zdroj: "live" wayback_snapshot: "" stazeno: "2026-09-14 10:41:36" znaku: 195368 slov: 25187 kodovani: "utf-8" sha256: "442ce96fa6713ca17220230dc7293f84a218884dd38c3b4a9c7546edc3a03d42" --- ##### ModelsExpand Collapse EvalCreateResponse object { id, created_at, data_source_config, 4 more } An Eval object with a data source config and testing criteria. An Eval represents a task to be done for your LLM integration. Like: Improve the quality of my chatbot See how well my chatbot handles customer support Check if o4-mini is better at my usecase than gpt-6-astra id: stringUnique identifier for the evaluation.created_at: numberThe Unix timestamp (in seconds) for when the eval was created.formatunixtimedata_source_config: [EvalCustomDataSourceConfig](/api/reference/resources/evals#(resource)%20evals%20%3E%20(model)%20eval_custom_data_source_config%20%3E%20(schema)) { schema, type } or object { schema, type, metadata } or [EvalStoredCompletionsDataSourceConfig](/api/reference/resources/evals#(resource)%20evals%20%3E%20(model)%20eval_stored_completions_data_source_config%20%3E%20(schema)) { schema, type, metadata } Configuration of data sources used in runs of the evaluation.One of the following:EvalCustomDataSourceConfig object { schema, type } A CustomDataSourceConfig which specifies the schema of your `item` and optionally `sample` namespaces. The response schema defines the shape of the data that will be: Used to define your testing criteria and What data is required when creating a run schema: map[unknown]The json schema for the run data source items. Learn how to build JSON schemas [here](https://json-schema.org/).type: "custom"The type of data source. Always `custom`.LogsDataSourceConfig object { schema, type, metadata } A LogsDataSourceConfig which specifies the metadata property of your logs query. This is usually metadata like `usecase=chatbot` or `prompt-version=v2`, etc. The schema returned by this data source config is used to defined what variables are available in your evals. `item` and `sample` are both defined when using this data source config.schema: map[unknown]The json schema for the run data source items. Learn how to build JSON schemas [here](https://json-schema.org/).type: "logs"The type of data source. Always `logs`.metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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.EvalStoredCompletionsDataSourceConfig object { schema, type, metadata } Deprecated in favor of LogsDataSourceConfig.schema: map[unknown]The json schema for the run data source items. Learn how to build JSON schemas [here](https://json-schema.org/).type: "stored_completions"The type of data source. Always `stored_completions`.metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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.metadata: [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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: stringThe name of the evaluation.object: "eval"The object type.testing_criteria: array of [LabelModelGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20label_model_grader%20%3E%20(schema)) { input, labels, model, 3 more } or [StringCheckGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20string_check_grader%20%3E%20(schema)) { input, name, operation, 2 more } or [TextSimilarityGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20text_similarity_grader%20%3E%20(schema)) { evaluation_metric, input, name, 2 more } or 2 moreA list of testing criteria.One of the following:LabelModelGrader object { input, labels, model, 3 more } A LabelModelGrader object which uses a model to assign labels to each item in the evaluation.input: array of object { content, role, type } content: string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } 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.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } 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`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: The breakpoint mode. Always `explicit`.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`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: "input_image"The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.input_audio: object { data, format } data: stringBase64-encoded audio data.: One of the following:type: "input_audio"The type of the input item. Always `input_audio`.GraderInputs = array of string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } 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.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: The type of the input item. Always `input_text`.: optional OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: The type of the output text. Always `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.formaturitype: The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.: type: The type of the input item. Always `input_audio`.role: "user" or "assistant" or "system" or "developer"The role of the message input. One of `user`, `assistant`, `system`, or `developer`.One of the following:"user""assistant""system""developer"type: optional "message"The type of the message input. Always `message`.labels: array of stringThe labels to assign to each item in the evaluation.model: stringThe model to use for the evaluation. Must support structured outputs.name: stringThe name of the grader.passing_labels: array of stringThe labels that indicate a passing result. Must be a subset of labels.type: "label_model"The object type, which is always `label_model`.StringCheckGrader object { input, name, operation, 2 more } A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.input: stringThe input text. This may include template strings.name: stringThe name of the grader.operation: "eq" or "ne" or "like" or "ilike"The string check operation to perform. One of `eq`, `ne`, `like`, or `ilike`.One of the following:"eq""ne""like""ilike"reference: stringThe reference text. This may include template strings.type: "string_check"The object type, which is always `string_check`.TextSimilarityGrader = [TextSimilarityGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20text_similarity_grader%20%3E%20(schema)) { evaluation_metric, input, name, 2 more } A TextSimilarityGrader object which grades text based on similarity metrics.pass_threshold: numberThe threshold for the score.PythonGrader = [PythonGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20python_grader%20%3E%20(schema)) { name, source, type, image_tag } A PythonGrader object that runs a python script on the input.pass_threshold: optional numberThe threshold for the score.ScoreModelGrader = [ScoreModelGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20score_model_grader%20%3E%20(schema)) { input, model, name, 3 more } A ScoreModelGrader object that uses a model to assign a score to the input.pass_threshold: optional numberThe threshold for the score. EvalCustomDataSourceConfig object { schema, type } A CustomDataSourceConfig which specifies the schema of your `item` and optionally `sample` namespaces. The response schema defines the shape of the data that will be: Used to define your testing criteria and What data is required when creating a run schema: map[unknown]The json schema for the run data source items. Learn how to build JSON schemas [here](https://json-schema.org/).type: "custom"The type of data source. Always `custom`. EvalDeleteResponse object { deleted, eval_id, object } deleted: booleaneval_id: stringobject: string EvalListResponse object { id, created_at, data_source_config, 4 more } An Eval object with a data source config and testing criteria. An Eval represents a task to be done for your LLM integration. Like: Improve the quality of my chatbot See how well my chatbot handles customer support Check if o4-mini is better at my usecase than gpt-6-astra id: stringUnique identifier for the evaluation.created_at: numberThe Unix timestamp (in seconds) for when the eval was created.formatunixtimedata_source_config: [EvalCustomDataSourceConfig](/api/reference/resources/evals#(resource)%20evals%20%3E%20(model)%20eval_custom_data_source_config%20%3E%20(schema)) { schema, type } or object { schema, type, metadata } or [EvalStoredCompletionsDataSourceConfig](/api/reference/resources/evals#(resource)%20evals%20%3E%20(model)%20eval_stored_completions_data_source_config%20%3E%20(schema)) { schema, type, metadata } Configuration of data sources used in runs of the evaluation.One of the following:EvalCustomDataSourceConfig object { schema, type } A CustomDataSourceConfig which specifies the schema of your `item` and optionally `sample` namespaces. The response schema defines the shape of the data that will be: Used to define your testing criteria and What data is required when creating a run schema: map[unknown]The json schema for the run data source items. Learn how to build JSON schemas [here](https://json-schema.org/).type: "custom"The type of data source. Always `custom`.LogsDataSourceConfig object { schema, type, metadata } A LogsDataSourceConfig which specifies the metadata property of your logs query. This is usually metadata like `usecase=chatbot` or `prompt-version=v2`, etc. The schema returned by this data source config is used to defined what variables are available in your evals. `item` and `sample` are both defined when using this data source config.schema: map[unknown]The json schema for the run data source items. Learn how to build JSON schemas [here](https://json-schema.org/).type: "logs"The type of data source. Always `logs`.metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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.EvalStoredCompletionsDataSourceConfig object { schema, type, metadata } Deprecated in favor of LogsDataSourceConfig.schema: map[unknown]The json schema for the run data source items. Learn how to build JSON schemas [here](https://json-schema.org/).type: "stored_completions"The type of data source. Always `stored_completions`.metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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.metadata: [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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: stringThe name of the evaluation.object: "eval"The object type.testing_criteria: array of [LabelModelGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20label_model_grader%20%3E%20(schema)) { input, labels, model, 3 more } or [StringCheckGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20string_check_grader%20%3E%20(schema)) { input, name, operation, 2 more } or [TextSimilarityGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20text_similarity_grader%20%3E%20(schema)) { evaluation_metric, input, name, 2 more } or 2 moreA list of testing criteria.One of the following:LabelModelGrader object { input, labels, model, 3 more } A LabelModelGrader object which uses a model to assign labels to each item in the evaluation.input: array of object { content, role, type } content: string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } 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.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } 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`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: The breakpoint mode. Always `explicit`.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`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: "input_image"The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.input_audio: object { data, format } data: stringBase64-encoded audio data.: One of the following:type: "input_audio"The type of the input item. Always `input_audio`.GraderInputs = array of string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } 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.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: The type of the input item. Always `input_text`.: optional OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: The type of the output text. Always `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.formaturitype: The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.: type: The type of the input item. Always `input_audio`.role: "user" or "assistant" or "system" or "developer"The role of the message input. One of `user`, `assistant`, `system`, or `developer`.One of the following:"user""assistant""system""developer"type: optional "message"The type of the message input. Always `message`.labels: array of stringThe labels to assign to each item in the evaluation.model: stringThe model to use for the evaluation. Must support structured outputs.name: stringThe name of the grader.passing_labels: array of stringThe labels that indicate a passing result. Must be a subset of labels.type: "label_model"The object type, which is always `label_model`.StringCheckGrader object { input, name, operation, 2 more } A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.input: stringThe input text. This may include template strings.name: stringThe name of the grader.operation: "eq" or "ne" or "like" or "ilike"The string check operation to perform. One of `eq`, `ne`, `like`, or `ilike`.One of the following:"eq""ne""like""ilike"reference: stringThe reference text. This may include template strings.type: "string_check"The object type, which is always `string_check`.TextSimilarityGrader = [TextSimilarityGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20text_similarity_grader%20%3E%20(schema)) { evaluation_metric, input, name, 2 more } A TextSimilarityGrader object which grades text based on similarity metrics.pass_threshold: numberThe threshold for the score.PythonGrader = [PythonGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20python_grader%20%3E%20(schema)) { name, source, type, image_tag } A PythonGrader object that runs a python script on the input.pass_threshold: optional numberThe threshold for the score.ScoreModelGrader = [ScoreModelGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20score_model_grader%20%3E%20(schema)) { input, model, name, 3 more } A ScoreModelGrader object that uses a model to assign a score to the input.pass_threshold: optional numberThe threshold for the score. EvalRetrieveResponse object { id, created_at, data_source_config, 4 more } An Eval object with a data source config and testing criteria. An Eval represents a task to be done for your LLM integration. Like: Improve the quality of my chatbot See how well my chatbot handles customer support Check if o4-mini is better at my usecase than gpt-6-astra id: stringUnique identifier for the evaluation.created_at: numberThe Unix timestamp (in seconds) for when the eval was created.formatunixtimedata_source_config: [EvalCustomDataSourceConfig](/api/reference/resources/evals#(resource)%20evals%20%3E%20(model)%20eval_custom_data_source_config%20%3E%20(schema)) { schema, type } or object { schema, type, metadata } or [EvalStoredCompletionsDataSourceConfig](/api/reference/resources/evals#(resource)%20evals%20%3E%20(model)%20eval_stored_completions_data_source_config%20%3E%20(schema)) { schema, type, metadata } Configuration of data sources used in runs of the evaluation.One of the following:EvalCustomDataSourceConfig object { schema, type } A CustomDataSourceConfig which specifies the schema of your `item` and optionally `sample` namespaces. The response schema defines the shape of the data that will be: Used to define your testing criteria and What data is required when creating a run schema: map[unknown]The json schema for the run data source items. Learn how to build JSON schemas [here](https://json-schema.org/).type: "custom"The type of data source. Always `custom`.LogsDataSourceConfig object { schema, type, metadata } A LogsDataSourceConfig which specifies the metadata property of your logs query. This is usually metadata like `usecase=chatbot` or `prompt-version=v2`, etc. The schema returned by this data source config is used to defined what variables are available in your evals. `item` and `sample` are both defined when using this data source config.schema: map[unknown]The json schema for the run data source items. Learn how to build JSON schemas [here](https://json-schema.org/).type: "logs"The type of data source. Always `logs`.metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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.EvalStoredCompletionsDataSourceConfig object { schema, type, metadata } Deprecated in favor of LogsDataSourceConfig.schema: map[unknown]The json schema for the run data source items. Learn how to build JSON schemas [here](https://json-schema.org/).type: "stored_completions"The type of data source. Always `stored_completions`.metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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.metadata: [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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: stringThe name of the evaluation.object: "eval"The object type.testing_criteria: array of [LabelModelGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20label_model_grader%20%3E%20(schema)) { input, labels, model, 3 more } or [StringCheckGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20string_check_grader%20%3E%20(schema)) { input, name, operation, 2 more } or [TextSimilarityGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20text_similarity_grader%20%3E%20(schema)) { evaluation_metric, input, name, 2 more } or 2 moreA list of testing criteria.One of the following:LabelModelGrader object { input, labels, model, 3 more } A LabelModelGrader object which uses a model to assign labels to each item in the evaluation.input: array of object { content, role, type } content: string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } 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.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } 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`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: The breakpoint mode. Always `explicit`.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`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: "input_image"The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.input_audio: object { data, format } data: stringBase64-encoded audio data.: One of the following:type: "input_audio"The type of the input item. Always `input_audio`.GraderInputs = array of string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } 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.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: The type of the input item. Always `input_text`.: optional OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: The type of the output text. Always `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.formaturitype: The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.: type: The type of the input item. Always `input_audio`.role: "user" or "assistant" or "system" or "developer"The role of the message input. One of `user`, `assistant`, `system`, or `developer`.One of the following:"user""assistant""system""developer"type: optional "message"The type of the message input. Always `message`.labels: array of stringThe labels to assign to each item in the evaluation.model: stringThe model to use for the evaluation. Must support structured outputs.name: stringThe name of the grader.passing_labels: array of stringThe labels that indicate a passing result. Must be a subset of labels.type: "label_model"The object type, which is always `label_model`.StringCheckGrader object { input, name, operation, 2 more } A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.input: stringThe input text. This may include template strings.name: stringThe name of the grader.operation: "eq" or "ne" or "like" or "ilike"The string check operation to perform. One of `eq`, `ne`, `like`, or `ilike`.One of the following:"eq""ne""like""ilike"reference: stringThe reference text. This may include template strings.type: "string_check"The object type, which is always `string_check`.TextSimilarityGrader = [TextSimilarityGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20text_similarity_grader%20%3E%20(schema)) { evaluation_metric, input, name, 2 more } A TextSimilarityGrader object which grades text based on similarity metrics.pass_threshold: numberThe threshold for the score.PythonGrader = [PythonGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20python_grader%20%3E%20(schema)) { name, source, type, image_tag } A PythonGrader object that runs a python script on the input.pass_threshold: optional numberThe threshold for the score.ScoreModelGrader = [ScoreModelGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20score_model_grader%20%3E%20(schema)) { input, model, name, 3 more } A ScoreModelGrader object that uses a model to assign a score to the input.pass_threshold: optional numberThe threshold for the score. EvalStoredCompletionsDataSourceConfig object { schema, type, metadata } Deprecated in favor of LogsDataSourceConfig.schema: map[unknown]The json schema for the run data source items. Learn how to build JSON schemas [here](https://json-schema.org/).type: "stored_completions"The type of data source. Always `stored_completions`.metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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. EvalUpdateResponse object { id, created_at, data_source_config, 4 more } An Eval object with a data source config and testing criteria. An Eval represents a task to be done for your LLM integration. Like: Improve the quality of my chatbot See how well my chatbot handles customer support Check if o4-mini is better at my usecase than gpt-6-astra id: stringUnique identifier for the evaluation.created_at: numberThe Unix timestamp (in seconds) for when the eval was created.formatunixtimedata_source_config: [EvalCustomDataSourceConfig](/api/reference/resources/evals#(resource)%20evals%20%3E%20(model)%20eval_custom_data_source_config%20%3E%20(schema)) { schema, type } or object { schema, type, metadata } or [EvalStoredCompletionsDataSourceConfig](/api/reference/resources/evals#(resource)%20evals%20%3E%20(model)%20eval_stored_completions_data_source_config%20%3E%20(schema)) { schema, type, metadata } Configuration of data sources used in runs of the evaluation.One of the following:EvalCustomDataSourceConfig object { schema, type } A CustomDataSourceConfig which specifies the schema of your `item` and optionally `sample` namespaces. The response schema defines the shape of the data that will be: Used to define your testing criteria and What data is required when creating a run schema: map[unknown]The json schema for the run data source items. Learn how to build JSON schemas [here](https://json-schema.org/).type: "custom"The type of data source. Always `custom`.LogsDataSourceConfig object { schema, type, metadata } A LogsDataSourceConfig which specifies the metadata property of your logs query. This is usually metadata like `usecase=chatbot` or `prompt-version=v2`, etc. The schema returned by this data source config is used to defined what variables are available in your evals. `item` and `sample` are both defined when using this data source config.schema: map[unknown]The json schema for the run data source items. Learn how to build JSON schemas [here](https://json-schema.org/).type: "logs"The type of data source. Always `logs`.metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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.EvalStoredCompletionsDataSourceConfig object { schema, type, metadata } Deprecated in favor of LogsDataSourceConfig.schema: map[unknown]The json schema for the run data source items. Learn how to build JSON schemas [here](https://json-schema.org/).type: "stored_completions"The type of data source. Always `stored_completions`.metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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.metadata: [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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: stringThe name of the evaluation.object: "eval"The object type.testing_criteria: array of [LabelModelGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20label_model_grader%20%3E%20(schema)) { input, labels, model, 3 more } or [StringCheckGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20string_check_grader%20%3E%20(schema)) { input, name, operation, 2 more } or [TextSimilarityGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20text_similarity_grader%20%3E%20(schema)) { evaluation_metric, input, name, 2 more } or 2 moreA list of testing criteria.One of the following:LabelModelGrader object { input, labels, model, 3 more } A LabelModelGrader object which uses a model to assign labels to each item in the evaluation.input: array of object { content, role, type } content: string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } 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.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } 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`.prompt_cache_breakpoint: optional object { mode } Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s `prompt_cache_options.ttl`; the boundary is not rounded to a token block.mode: The breakpoint mode. Always `explicit`.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`.InputImage object { image_url, type, detail } An image input block used within EvalItem content arrays.image_url: stringThe URL of the image input.formaturitype: "input_image"The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.input_audio: object { data, format } data: stringBase64-encoded audio data.: One of the following:type: "input_audio"The type of the input item. Always `input_audio`.GraderInputs = array of string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } 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.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: The type of the input item. Always `input_text`.: optional OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: The type of the output text. Always `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.formaturitype: The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.: type: The type of the input item. Always `input_audio`.role: "user" or "assistant" or "system" or "developer"The role of the message input. One of `user`, `assistant`, `system`, or `developer`.One of the following:"user""assistant""system""developer"type: optional "message"The type of the message input. Always `message`.labels: array of stringThe labels to assign to each item in the evaluation.model: stringThe model to use for the evaluation. Must support structured outputs.name: stringThe name of the grader.passing_labels: array of stringThe labels that indicate a passing result. Must be a subset of labels.type: "label_model"The object type, which is always `label_model`.StringCheckGrader object { input, name, operation, 2 more } A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.input: stringThe input text. This may include template strings.name: stringThe name of the grader.operation: "eq" or "ne" or "like" or "ilike"The string check operation to perform. One of `eq`, `ne`, `like`, or `ilike`.One of the following:"eq""ne""like""ilike"reference: stringThe reference text. This may include template strings.type: "string_check"The object type, which is always `string_check`.TextSimilarityGrader = [TextSimilarityGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20text_similarity_grader%20%3E%20(schema)) { evaluation_metric, input, name, 2 more } A TextSimilarityGrader object which grades text based on similarity metrics.pass_threshold: numberThe threshold for the score.PythonGrader = [PythonGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20python_grader%20%3E%20(schema)) { name, source, type, image_tag } A PythonGrader object that runs a python script on the input.pass_threshold: optional numberThe threshold for the score.ScoreModelGrader = [ScoreModelGrader](/api/reference/resources/graders#(resource)%20graders.grader_models%20%3E%20(model)%20score_model_grader%20%3E%20(schema)) { input, model, name, 3 more } A ScoreModelGrader object that uses a model to assign a score to the input.pass_threshold: optional numberThe threshold for the score. ##### ModelsExpand Collapse 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 `item` namespace in this run’s data source.One of the following: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`.EvalJSONLFileIDSource object { id, type } id: stringThe identifier of the file.type: "file_id"The type of jsonl source. Always `file_id`.StoredCompletionsRunDataSource object { type, created_after, created_before, 3 more } A StoredCompletionsRunDataSource configuration describing a set of filterstype: "stored_completions"The type of source. Always `stored_completions`.created_after: optional number or nullAn optional Unix timestamp to filter items created after this time.created_before: optional number or nullAn optional Unix timestamp to filter items created before this time.limit: optional number or nullAn optional maximum number of items to return.metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 string or nullAn optional model to filter by (e.g., ‘gpt-6-astra’).type: "completions"The type of run data source. Always `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 the `item` namespace.One of the following:TemplateInputMessages object { template, type } template: array of [EasyInputMessage](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20easy_input_message%20%3E%20(schema)) { content, role, phase, type } or object { content, role, type } A list of chat messages forming the prompt or context. May include variable references to the `item` namespace, ie {{item.name}}.One of the following:EasyInputMessage object { content, role, phase, type } A message input to the model with a role indicating instruction following hierarchy. Instructions given with the `developer` or `system` role take precedence over instructions given with the `user` role. Messages with the `assistant` role are presumed to have been generated by the model in previous interactions.content: string or [ResponseInputMessageContentList](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_message_content_list%20%3E%20(schema)) { , , } Text, image, or audio input to the model, used to generate a response. Can also contain previous assistant responses.One of the following:TextInput = stringA text input to the model.ResponseInputMessageContentList = array of [ResponseInputContent](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_content%20%3E%20(schema))A list of one or many input items to the model, containing different content types.One of the following:ResponseInputText ResponseInputImage ResponseInputFile role: "user" or "assistant" or "system" or "developer"The role of the message input. One of `user`, `assistant`, `system`, or `developer`.One of the following:"user""assistant""system""developer"phase: optional "commentary" or "final_answer" or nullLabels an `assistant` message as intermediate commentary (`commentary`) or the final answer (`final_answer`). For models like `gpt-5.3-codex` and beyond, when sending follow-up requests, preserve and resend phase on all assistant messages — dropping it can degrade performance. Not used for user messages.One of the following:"commentary""final_answer"type: optional "message"The type of the message input. Always `message`.EvalMessageObject object { content, role, type } A message input to the model with a role indicating instruction following hierarchy. Instructions given with the `developer` or `system` role take precedence over instructions given with the `user` role. Messages with the `assistant` role are presumed to have been generated by the model in previous interactions.content: string or [ResponseInputText](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_input_text%20%3E%20(schema)) { text, type, prompt_cache_breakpoint } 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.One of the following:TextInput = stringA text input to the model.ResponseInputText object { text, type, prompt_cache_breakpoint } A text input to the model.text: stringThe text input to the model.type: The type of the input item. Always `input_text`.: optional OutputText object { text, type } A text output from the model.text: stringThe text output from the model.type: The type of the output text. Always `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.formaturitype: The type of the image input. Always `input_image`.detail: optional stringThe detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`.ResponseInputAudio object { input_audio, type } An audio input to the model.: type: The type of the input item. Always `input_audio`.GraderInputs = array of string or or object or 2 moreA list of inputs, each of which may be either an input text, output text, input image, or input audio object.One of the following:TextInput = stringA text input to the model.ResponseInputText OutputText InputImage ResponseInputAudio role: "user" or "assistant" or "system" or "developer"The role of the message input. One of `user`, `assistant`, `system`, or `developer`.One of the following:"user""assistant""system""developer"type: optional "message"The type of the message input. Always `message`.type: "template"The type of input messages. Always `template`.ItemReferenceInputMessages object { item_reference, type } item_reference: stringA reference to a variable in the `item` namespace. Ie, “item.input_trajectory”type: "item_reference"The type of input messages. Always `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 [ReasoningEffort](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20reasoning_effort%20%3E%20(schema)) or nullConstrains effort on reasoning for reasoning models. Currently supported values are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. Not all reasoning models support every value. See the [reasoning guide](/api/docs/guides/reasoning) for model-specific support.response_format: optional [ResponseFormatText](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20response_format_text%20%3E%20(schema)) { type } or [ResponseFormatJSONSchema](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20response_format_json_schema%20%3E%20(schema)) { json_schema, type } or [ResponseFormatJSONObject](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20response_format_json_object%20%3E%20(schema)) { type } An 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](/api/docs/guides/structured-outputs). Setting to `{ "type": "json_object" }` enables the older JSON mode, which ensures the message the model generates is valid JSON. Using `json_schema` is preferred for models that support it.One of the following:ResponseFormatText object { type } Default response format. Used to generate text responses.type: "text"The type of response format being defined. Always `text`.ResponseFormatJSONSchema object { json_schema, type } JSON Schema response format. Used to generate structured JSON responses. Learn more about [Structured Outputs](/api/docs/guides/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](https://json-schema.org/).strict: optional boolean or nullWhether to enable strict schema adherence when generating the output. If set to true, the model will always follow the exact schema defined in the `schema` field. Only a subset of JSON Schema is supported when `strict` is `true`. To learn more, read the [Structured Outputs guide](/api/docs/guides/structured-outputs).type: "json_schema"The type of response format being defined. Always `json_schema`.ResponseFormatJSONObject object { type } JSON object response format. An older method of generating JSON responses. Using `json_schema` is 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`.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 [ChatCompletionFunctionTool](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_function_tool%20%3E%20(schema)) { function, type } A 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](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20function_definition%20%3E%20(schema)) { name, description, parameters, strict } type: "function"The type of the tool. Currently, only `function` is supported.top_p: optional numberAn alternative to temperature for nucleus sampling; 1.0 includes all tokens. CreateEvalJSONLRunDataSource object { source, type } A JsonlRunDataSource object with that specifies a JSONL file that matches the evalsource: object { content, type } or object { id, type } Determines what populates the `item` namespace in the data source.One of the following: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`.EvalJSONLFileIDSource object { id, type } id: stringThe identifier of the file.type: "file_id"The type of jsonl source. Always `file_id`.type: "jsonl"The type of data source. Always `jsonl`. EvalAPIError object { code, message } An object representing an error response from the Eval API.code: stringThe error code.message: stringThe error message. RunCancelResponse object { id, created_at, data_source, 11 more } A schema representing an evaluation run.id: stringUnique identifier for the evaluation run.created_at: numberUnix timestamp (in seconds) when the evaluation run was created.formatunixtimedata_source: [CreateEvalJSONLRunDataSource](/api/reference/resources/evals#(resource)%20evals.runs%20%3E%20(model)%20create_eval_jsonl_run_data_source%20%3E%20(schema)) { source, type } or [CreateEvalCompletionsRunDataSource](/api/reference/resources/evals#(resource)%20evals.runs%20%3E%20(model)%20create_eval_completions_run_data_source%20%3E%20(schema)) { source, type, input_messages, 2 more } or object { source, type, input_messages, 2 more } Information about the run’s data source.One of the following:CreateEvalJSONLRunDataSource object { source, type } A JsonlRunDataSource object with that specifies a JSONL file that matches the evalsource: object { content, type } or object { id, type } Determines what populates the `item` namespace in the data source.One of the following: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`.EvalJSONLFileIDSource object { id, type } id: stringThe identifier of the file.type: "file_id"The type of jsonl source. Always `file_id`.type: "jsonl"The type of data source. Always `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 `item` namespace in this run’s data source.One of the following: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`.EvalJSONLFileIDSource object { id, type } id: stringThe identifier of the file.type: "file_id"The type of jsonl source. Always `file_id`.StoredCompletionsRunDataSource object { type, created_after, created_before, 3 more } A StoredCompletionsRunDataSource configuration describing a set of filterstype: "stored_completions"The type of source. Always `stored_completions`.created_after: optional number or nullAn optional Unix timestamp to filter items created after this time.created_before: optional number or nullAn optional Unix timestamp to filter items created before this time.limit: optional number or nullAn optional maximum number of items to return.metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 string or nullAn optional model to filter by (e.g., ‘gpt-6-astra’).type: "completions"The type of run data source. Always `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 the `item` namespace.One of the following:TemplateInputMessages object { template, type } template: array of [EasyInputMessage](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20easy_input_message%20%3E%20(schema)) { content, role, phase, type } or object { content, role, type } A list of chat messages forming the prompt or context. May include variable references to the `item` namespace, ie {{item.name}}.One of the following:EasyInputMessage object { content, role, phase, type } A message input to the model with a role indicating instruction following hierarchy. Instructions given with the `developer` or `system` role take precedence over instructions given with the `user` role. Messages with the `assistant` role are presumed to have been generated by the model in previous interactions.: One of the following:: One of the following:: optional One of the following:type: optional The type of the message input. Always `message`.EvalMessageObject object { content, role, type } A message input to the model with a role indicating instruction following hierarchy. Instructions given with the `developer` or `system` role take precedence over instructions given with the `user` role. Messages with the `assistant` role are presumed to have been generated by the model in previous interactions.: One of the following:: One of the following:type: optional The type of the message input. Always `message`.type: "template"The type of input messages. Always `template`.ItemReferenceInputMessages object { item_reference, type } item_reference: stringA reference to a variable in the `item` namespace. Ie, “item.input_trajectory”type: "item_reference"The type of input messages. Always `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 [ReasoningEffort](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20reasoning_effort%20%3E%20(schema)) or nullConstrains effort on reasoning for reasoning models. Currently supported values are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. Not all reasoning models support every value. See the [reasoning guide](/api/docs/guides/reasoning) for model-specific support.response_format: optional [ResponseFormatText](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20response_format_text%20%3E%20(schema)) { type } or [ResponseFormatJSONSchema](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20response_format_json_schema%20%3E%20(schema)) { json_schema, type } or [ResponseFormatJSONObject](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20response_format_json_object%20%3E%20(schema)) { type } An 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](/api/docs/guides/structured-outputs). Setting to `{ "type": "json_object" }` enables the older JSON mode, which ensures the message the model generates is valid JSON. Using `json_schema` is preferred for models that support it.One of the following:ResponseFormatText object { type } Default response format. Used to generate text responses.type: "text"The type of response format being defined. Always `text`.ResponseFormatJSONSchema object { json_schema, type } JSON Schema response format. Used to generate structured JSON responses. Learn more about [Structured Outputs](/api/docs/guides/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](https://json-schema.org/).strict: optional or Whether to enable strict schema adherence when generating the output. If set to true, the model will always follow the exact schema defined in the `schema` field. Only a subset of JSON Schema is supported when `strict` is `true`. To learn more, read the [Structured Outputs guide](/api/docs/guides/structured-outputs).type: "json_schema"The type of response format being defined. Always `json_schema`.ResponseFormatJSONObject object { type } JSON object response format. An older method of generating JSON responses. Using `json_schema` is 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`.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 [ChatCompletionFunctionTool](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_function_tool%20%3E%20(schema)) { function, type } A 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](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20function_definition%20%3E%20(schema)) { name, description, parameters, strict } type: "function"The type of the tool. Currently, only `function` is supported.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 `item` namespace in this run’s data source.One of the following: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`.EvalJSONLFileIDSource object { id, type } id: stringThe identifier of the file.type: "file_id"The type of jsonl source. Always `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`.created_after: optional number or nullOnly include items created after this timestamp (inclusive). This is a query parameter used to select responses.minimum0created_before: optional number or nullOnly include items created before this timestamp (inclusive). This is a query parameter used to select responses.minimum0instructions_search: optional string or nullOptional string to search the ‘instructions’ field. This is a query parameter used to select responses.metadata: optional unknown or nullMetadata filter for the responses. This is a query parameter used to select responses.model: optional string or nullThe name of the model to find responses for. This is a query parameter used to select responses.reasoning_effort: optional [ReasoningEffort](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20reasoning_effort%20%3E%20(schema)) or nullConstrains effort on reasoning for reasoning models. Currently supported values are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. Not all reasoning models support every value. See the [reasoning guide](/api/docs/guides/reasoning) for model-specific support.temperature: optional number or nullSampling temperature. This is a query parameter used to select responses.tools: optional array of string or nullList of tool names. This is a query parameter used to select responses.top_p: optional number or nullNucleus sampling parameter. This is a query parameter used to select responses.users: optional array of string or nullList of user identifiers. This is a query parameter used to select responses.type: "responses"The type of run data source. Always `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 the `item` namespace.One of the following: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 `item` namespace, ie {{item.name}}.One of the following: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 `developer` or `system` role take precedence over instructions given with the `user` role. Messages with the `assistant` role are presumed to have been generated by the model in previous interactions.: One of the following:: One of the following:type: optional The type of the message input. Always `message`.type: "template"The type of input messages. Always `template`.InputMessagesItemReference object { item_reference, type } item_reference: stringA reference to a variable in the `item` namespace. Ie, “item.name”type: "item_reference"The type of input messages. Always `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 [ReasoningEffort](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20reasoning_effort%20%3E%20(schema)) or nullConstrains effort on reasoning for reasoning models. Currently supported values are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. Not all reasoning models support every value. See the [reasoning guide](/api/docs/guides/reasoning) for model-specific support.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: [Text inputs and outputs](/api/docs/guides/text) [Structured Outputs](/api/docs/guides/structured-outputs) format: optional [ResponseFormatTextConfig](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_format_text_config%20%3E%20(schema))An 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](/api/docs/guides/structured-outputs). 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. Using `json_schema` is preferred for models that support it.tools: optional array of object { name, parameters, strict, 6 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 13 moreAn array of tools the model may call while generating a response. You can specify which tool to use by setting the `tool_choice` parameter. 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](/api/docs/guides/tools-web-search) or [file search](/api/docs/guides/tools-file-search). Learn more about [built-in tools](/api/docs/guides/tools). **Function calls (custom tools)**: Functions that are defined by you, enabling the model to call your own code. Learn more about [function calling](/api/docs/guides/function-calling). One of the following:Function object { name, parameters, strict, 6 more } Defines a function in your own code the model can choose to call. Learn more about [function calling](/api/docs/guides/function-calling).name: stringThe name of the function to call.parameters: map[unknown] or nullA JSON schema object describing the parameters of the function.strict: boolean or nullWhether strict parameter validation is enforced for this function tool.type: "function"The type of the function tool. Always `function`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:"direct""programmatic"async: optional booleandefer_loading: optional booleanWhether this function is deferred and loaded via tool search.description: optional string or nullA description of the function. Used by the model to determine whether or not to call the function.output_schema: optional map[unknown] or nullA JSON schema object describing the JSON value encoded in string outputs for this 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](/api/docs/guides/tools-file-search).type: "file_search"The type of the file search tool. Always `file_search`.vector_store_ids: array of stringThe IDs of the vector stores to search.filters: optional or nullA filter to apply.One of the following:ComparisonFilter CompoundFilter 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.: optional : optional One of the following: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](/api/docs/guides/tools-computer-use).type: "computer"The type of the computer tool. Always `computer`.ComputerUsePreview object { display_height, display_width, environment, type } A tool that controls a virtual computer. Learn more about the [computer tool](/api/docs/guides/tools-computer-use).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.One of the following:"windows""mac""linux""ubuntu""browser"type: "computer_use_preview"The type of the computer use tool. Always `computer_use_preview`.WebSearch object { type, external_web_access, filters, 2 more } Search the Internet for sources related to the prompt. Learn more about the [web search tool](/api/docs/guides/tools-web-search).type: "web_search" or "web_search_2025_08_26"The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.One of the following:"web_search""web_search_2025_08_26"external_web_access: optional booleanAllow live internet access for web search. Defaults to true when omitted. When false, the web search tool runs in offline/cache-only mode and will not fetch new external content.filters: optional object { } or nullFilters for the search.allowed_domains: optional or Allowed 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`, or `high`. `medium` is the default.One of the following:"low""medium""high"user_location: optional object { } or nullThe approximate location of the user.city: optional or Free text input for the city of the user, e.g. `San Francisco`.country: optional or The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.region: optional or Free text input for the region of the user, e.g. `California`.timezone: optional or The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.type: optional The type of location approximation. Always `approximate`.Mcp object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol (MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-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`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:"direct""programmatic"allowed_tools: optional or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter 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`, or `tunnel_id` must be provided. Learn more about service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values 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` One of the following:"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] or nullOptional HTTP headers to send to the MCP server. Use for authentication or other purposes.require_approval: optional or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter McpToolApprovalSetting = One of the following: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`, or `tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of `server_url`, `connector_id`, or `tunnel_id` must be provided.CodeInterpreter object { container, type, allowed_callers } A tool that runs Python code to help generate a response to a prompt.container: string or object { } 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_limit` setting.One of the following:stringThe container ID.CodeInterpreterToolAuto type: "code_interpreter"The type of the code interpreter tool. Always `code_interpreter`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:"direct""programmatic"ProgrammaticToolCalling object { type } type: "programmatic_tool_calling"The type of the tool. Always `programmatic_tool_calling`.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`.action: optional "generate" or "edit" or "auto"Whether to generate a new image or edit an existing image. Default: `auto`.One of the following:"generate""edit""auto"background: optional "transparent" or "opaque" or "auto"Set the background of the generated image. One of `transparent`, `opaque`, or `auto`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including their `2026-09-08` snapshots, support `opaque` and `transparent` backgrounds. Transparent backgrounds are available for supported GPT Image models. For `gpt-image-2` and `gpt-image-2-2026-04-21`, this support is in preview. When using `transparent`, set the output format to `png` or `webp`. Default: `auto`.One of the following:"transparent""opaque""auto"input_fidelity: optional or nullControl 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-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`.One of the following:"high""low"input_image_mask: optional object { file_id, image_url } Optional mask for inpainting. Contains `image_url` (string, optional) and `file_id` (string, optional).file_id: optional stringFile ID for the mask image.image_url: optional stringBase64-encoded mask image.model: optional string or The image generation model to use. One of `gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`. Default: `gpt-image-1`.One of the following:stringOne of the following:moderation: optional "auto" or "low"Moderation level for the generated image. Default: `auto`.One of the following:"auto""low"output_compression: optional numberCompression level for the output image. Default: 100.minimum0maximum100output_format: optional "png" or "webp" or "jpeg"The output format of the generated image. One of `png`, `webp`, or `jpeg`. Default: `png`.One of the following:"png""webp""jpeg"partial_images: optional numberNumber of partial images to generate in streaming mode, from 0 (default value) to 3.minimum0maximum3quality: optional "low" or "medium" or "high" or 3 moreThe quality of the generated image. The GPT image models support `low`, `medium`, and `high`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including their `2026-09-08` snapshots, also support `xhigh` and `max`. Default: `auto`.One of the following:"low""medium""high""xhigh""max""auto"size: optional string or The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, and `gpt-image-2.5-flare-2026-09-08`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model’s current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.One of the following:stringOne of the following: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`.Shell object { type, allowed_callers, environment } A tool that allows the model to execute shell commands.type: "shell"The type of the shell tool. Always `shell`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:"direct""programmatic"environment: optional or nullOne of the following:ContainerAuto LocalEnvironment ContainerReference Custom object { name, type, allowed_callers, 4 more } A custom tool that processes input using a specified format. Learn more about [custom tools](/api/docs/guides/function-calling#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`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:"direct""programmatic"async: optional booleanWhether the tool response can be returned asynchronously versus immediately returned on next response creation.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 [CustomToolInputFormat](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20custom_tool_input_format%20%3E%20(schema))The input format for the custom tool. Default is unconstrained text.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`).minLength1tools: array of object or objectThe function/custom tools available inside this namespace.One of the following:Function Custom type: "namespace"The type of the tool. Always `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`.description: optional string or nullDescription 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.One of the following:"server""client"parameters: optional unknown or nullParameter 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](/api/docs/guides/tools-web-search).type: "web_search_preview" or "web_search_preview_2025_03_11"The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.One of the following:"web_search_preview""web_search_preview_2025_03_11"search_content_types: optional array of "text" or "image"One of the following:"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`, or `high`. `medium` is the default.One of the following:"low""medium""high"user_location: optional object { } or nullThe user’s location.type: The type of location approximation. Always `approximate`.city: optional or Free text input for the city of the user, e.g. `San Francisco`.country: optional or The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.region: optional or Free text input for the region of the user, e.g. `California`.timezone: optional or The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.ApplyPatch object { type, allowed_callers } Allows the assistant to create, delete, or update files using unified diffs.type: "apply_patch"The type of the tool. Always `apply_patch`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:"direct""programmatic"top_p: optional numberAn alternative to temperature for nucleus sampling; 1.0 includes all tokens.error: [EvalAPIError](/api/reference/resources/evals#(resource)%20evals.runs%20%3E%20(model)%20eval_api_error%20%3E%20(schema)) { code, message } An object representing an error response from the Eval API.eval_id: stringThe identifier of the associated evaluation.metadata: [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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”.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.formaturiresult_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. RunCreateResponse object { id, created_at, data_source, 11 more } A schema representing an evaluation run.id: stringUnique identifier for the evaluation run.created_at: numberUnix timestamp (in seconds) when the evaluation run was created.formatunixtimedata_source: [CreateEvalJSONLRunDataSource](/api/reference/resources/evals#(resource)%20evals.runs%20%3E%20(model)%20create_eval_jsonl_run_data_source%20%3E%20(schema)) { source, type } or [CreateEvalCompletionsRunDataSource](/api/reference/resources/evals#(resource)%20evals.runs%20%3E%20(model)%20create_eval_completions_run_data_source%20%3E%20(schema)) { source, type, input_messages, 2 more } or object { source, type, input_messages, 2 more } Information about the run’s data source.One of the following:CreateEvalJSONLRunDataSource object { source, type } A JsonlRunDataSource object with that specifies a JSONL file that matches the evalsource: object { content, type } or object { id, type } Determines what populates the `item` namespace in the data source.One of the following: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`.EvalJSONLFileIDSource object { id, type } id: stringThe identifier of the file.type: "file_id"The type of jsonl source. Always `file_id`.type: "jsonl"The type of data source. Always `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 `item` namespace in this run’s data source.One of the following: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`.EvalJSONLFileIDSource object { id, type } id: stringThe identifier of the file.type: "file_id"The type of jsonl source. Always `file_id`.StoredCompletionsRunDataSource object { type, created_after, created_before, 3 more } A StoredCompletionsRunDataSource configuration describing a set of filterstype: "stored_completions"The type of source. Always `stored_completions`.created_after: optional number or nullAn optional Unix timestamp to filter items created after this time.created_before: optional number or nullAn optional Unix timestamp to filter items created before this time.limit: optional number or nullAn optional maximum number of items to return.metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 string or nullAn optional model to filter by (e.g., ‘gpt-6-astra’).type: "completions"The type of run data source. Always `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 the `item` namespace.One of the following:TemplateInputMessages object { template, type } template: array of [EasyInputMessage](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20easy_input_message%20%3E%20(schema)) { content, role, phase, type } or object { content, role, type } A list of chat messages forming the prompt or context. May include variable references to the `item` namespace, ie {{item.name}}.One of the following:EasyInputMessage object { content, role, phase, type } A message input to the model with a role indicating instruction following hierarchy. Instructions given with the `developer` or `system` role take precedence over instructions given with the `user` role. Messages with the `assistant` role are presumed to have been generated by the model in previous interactions.: One of the following:: One of the following:: optional One of the following:type: optional The type of the message input. Always `message`.EvalMessageObject object { content, role, type } A message input to the model with a role indicating instruction following hierarchy. Instructions given with the `developer` or `system` role take precedence over instructions given with the `user` role. Messages with the `assistant` role are presumed to have been generated by the model in previous interactions.: One of the following:: One of the following:type: optional The type of the message input. Always `message`.type: "template"The type of input messages. Always `template`.ItemReferenceInputMessages object { item_reference, type } item_reference: stringA reference to a variable in the `item` namespace. Ie, “item.input_trajectory”type: "item_reference"The type of input messages. Always `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 [ReasoningEffort](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20reasoning_effort%20%3E%20(schema)) or nullConstrains effort on reasoning for reasoning models. Currently supported values are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. Not all reasoning models support every value. See the [reasoning guide](/api/docs/guides/reasoning) for model-specific support.response_format: optional [ResponseFormatText](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20response_format_text%20%3E%20(schema)) { type } or [ResponseFormatJSONSchema](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20response_format_json_schema%20%3E%20(schema)) { json_schema, type } or [ResponseFormatJSONObject](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20response_format_json_object%20%3E%20(schema)) { type } An 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](/api/docs/guides/structured-outputs). Setting to `{ "type": "json_object" }` enables the older JSON mode, which ensures the message the model generates is valid JSON. Using `json_schema` is preferred for models that support it.One of the following:ResponseFormatText object { type } Default response format. Used to generate text responses.type: "text"The type of response format being defined. Always `text`.ResponseFormatJSONSchema object { json_schema, type } JSON Schema response format. Used to generate structured JSON responses. Learn more about [Structured Outputs](/api/docs/guides/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](https://json-schema.org/).strict: optional or Whether to enable strict schema adherence when generating the output. If set to true, the model will always follow the exact schema defined in the `schema` field. Only a subset of JSON Schema is supported when `strict` is `true`. To learn more, read the [Structured Outputs guide](/api/docs/guides/structured-outputs).type: "json_schema"The type of response format being defined. Always `json_schema`.ResponseFormatJSONObject object { type } JSON object response format. An older method of generating JSON responses. Using `json_schema` is 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`.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 [ChatCompletionFunctionTool](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_function_tool%20%3E%20(schema)) { function, type } A 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](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20function_definition%20%3E%20(schema)) { name, description, parameters, strict } type: "function"The type of the tool. Currently, only `function` is supported.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 `item` namespace in this run’s data source.One of the following: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`.EvalJSONLFileIDSource object { id, type } id: stringThe identifier of the file.type: "file_id"The type of jsonl source. Always `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`.created_after: optional number or nullOnly include items created after this timestamp (inclusive). This is a query parameter used to select responses.minimum0created_before: optional number or nullOnly include items created before this timestamp (inclusive). This is a query parameter used to select responses.minimum0instructions_search: optional string or nullOptional string to search the ‘instructions’ field. This is a query parameter used to select responses.metadata: optional unknown or nullMetadata filter for the responses. This is a query parameter used to select responses.model: optional string or nullThe name of the model to find responses for. This is a query parameter used to select responses.reasoning_effort: optional [ReasoningEffort](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20reasoning_effort%20%3E%20(schema)) or nullConstrains effort on reasoning for reasoning models. Currently supported values are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. Not all reasoning models support every value. See the [reasoning guide](/api/docs/guides/reasoning) for model-specific support.temperature: optional number or nullSampling temperature. This is a query parameter used to select responses.tools: optional array of string or nullList of tool names. This is a query parameter used to select responses.top_p: optional number or nullNucleus sampling parameter. This is a query parameter used to select responses.users: optional array of string or nullList of user identifiers. This is a query parameter used to select responses.type: "responses"The type of run data source. Always `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 the `item` namespace.One of the following: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 `item` namespace, ie {{item.name}}.One of the following: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 `developer` or `system` role take precedence over instructions given with the `user` role. Messages with the `assistant` role are presumed to have been generated by the model in previous interactions.: One of the following:: One of the following:type: optional The type of the message input. Always `message`.type: "template"The type of input messages. Always `template`.InputMessagesItemReference object { item_reference, type } item_reference: stringA reference to a variable in the `item` namespace. Ie, “item.name”type: "item_reference"The type of input messages. Always `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 [ReasoningEffort](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20reasoning_effort%20%3E%20(schema)) or nullConstrains effort on reasoning for reasoning models. Currently supported values are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. Not all reasoning models support every value. See the [reasoning guide](/api/docs/guides/reasoning) for model-specific support.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: [Text inputs and outputs](/api/docs/guides/text) [Structured Outputs](/api/docs/guides/structured-outputs) format: optional [ResponseFormatTextConfig](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_format_text_config%20%3E%20(schema))An 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](/api/docs/guides/structured-outputs). 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. Using `json_schema` is preferred for models that support it.tools: optional array of object { name, parameters, strict, 6 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 13 moreAn array of tools the model may call while generating a response. You can specify which tool to use by setting the `tool_choice` parameter. 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](/api/docs/guides/tools-web-search) or [file search](/api/docs/guides/tools-file-search). Learn more about [built-in tools](/api/docs/guides/tools). **Function calls (custom tools)**: Functions that are defined by you, enabling the model to call your own code. Learn more about [function calling](/api/docs/guides/function-calling). One of the following:Function object { name, parameters, strict, 6 more } Defines a function in your own code the model can choose to call. Learn more about [function calling](/api/docs/guides/function-calling).name: stringThe name of the function to call.parameters: map[unknown] or nullA JSON schema object describing the parameters of the function.strict: boolean or nullWhether strict parameter validation is enforced for this function tool.type: "function"The type of the function tool. Always `function`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:"direct""programmatic"async: optional booleandefer_loading: optional booleanWhether this function is deferred and loaded via tool search.description: optional string or nullA description of the function. Used by the model to determine whether or not to call the function.output_schema: optional map[unknown] or nullA JSON schema object describing the JSON value encoded in string outputs for this 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](/api/docs/guides/tools-file-search).type: "file_search"The type of the file search tool. Always `file_search`.vector_store_ids: array of stringThe IDs of the vector stores to search.filters: optional or nullA filter to apply.One of the following:ComparisonFilter CompoundFilter 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.: optional : optional One of the following: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](/api/docs/guides/tools-computer-use).type: "computer"The type of the computer tool. Always `computer`.ComputerUsePreview object { display_height, display_width, environment, type } A tool that controls a virtual computer. Learn more about the [computer tool](/api/docs/guides/tools-computer-use).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.One of the following:"windows""mac""linux""ubuntu""browser"type: "computer_use_preview"The type of the computer use tool. Always `computer_use_preview`.WebSearch object { type, external_web_access, filters, 2 more } Search the Internet for sources related to the prompt. Learn more about the [web search tool](/api/docs/guides/tools-web-search).type: "web_search" or "web_search_2025_08_26"The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.One of the following:"web_search""web_search_2025_08_26"external_web_access: optional booleanAllow live internet access for web search. Defaults to true when omitted. When false, the web search tool runs in offline/cache-only mode and will not fetch new external content.filters: optional object { } or nullFilters for the search.allowed_domains: optional or Allowed 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`, or `high`. `medium` is the default.One of the following:"low""medium""high"user_location: optional object { } or nullThe approximate location of the user.city: optional or Free text input for the city of the user, e.g. `San Francisco`.country: optional or The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.region: optional or Free text input for the region of the user, e.g. `California`.timezone: optional or The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.type: optional The type of location approximation. Always `approximate`.Mcp object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol (MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-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`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:"direct""programmatic"allowed_tools: optional or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter 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`, or `tunnel_id` must be provided. Learn more about service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values 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` One of the following:"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] or nullOptional HTTP headers to send to the MCP server. Use for authentication or other purposes.require_approval: optional or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter McpToolApprovalSetting = One of the following: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`, or `tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of `server_url`, `connector_id`, or `tunnel_id` must be provided.CodeInterpreter object { container, type, allowed_callers } A tool that runs Python code to help generate a response to a prompt.container: string or object { } 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_limit` setting.One of the following:stringThe container ID.CodeInterpreterToolAuto type: "code_interpreter"The type of the code interpreter tool. Always `code_interpreter`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:"direct""programmatic"ProgrammaticToolCalling object { type } type: "programmatic_tool_calling"The type of the tool. Always `programmatic_tool_calling`.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`.action: optional "generate" or "edit" or "auto"Whether to generate a new image or edit an existing image. Default: `auto`.One of the following:"generate""edit""auto"background: optional "transparent" or "opaque" or "auto"Set the background of the generated image. One of `transparent`, `opaque`, or `auto`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including their `2026-09-08` snapshots, support `opaque` and `transparent` backgrounds. Transparent backgrounds are available for supported GPT Image models. For `gpt-image-2` and `gpt-image-2-2026-04-21`, this support is in preview. When using `transparent`, set the output format to `png` or `webp`. Default: `auto`.One of the following:"transparent""opaque""auto"input_fidelity: optional or nullControl 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-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`.One of the following:"high""low"input_image_mask: optional object { file_id, image_url } Optional mask for inpainting. Contains `image_url` (string, optional) and `file_id` (string, optional).file_id: optional stringFile ID for the mask image.image_url: optional stringBase64-encoded mask image.model: optional string or The image generation model to use. One of `gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`. Default: `gpt-image-1`.One of the following:stringOne of the following:moderation: optional "auto" or "low"Moderation level for the generated image. Default: `auto`.One of the following:"auto""low"output_compression: optional numberCompression level for the output image. Default: 100.minimum0maximum100output_format: optional "png" or "webp" or "jpeg"The output format of the generated image. One of `png`, `webp`, or `jpeg`. Default: `png`.One of the following:"png""webp""jpeg"partial_images: optional numberNumber of partial images to generate in streaming mode, from 0 (default value) to 3.minimum0maximum3quality: optional "low" or "medium" or "high" or 3 moreThe quality of the generated image. The GPT image models support `low`, `medium`, and `high`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including their `2026-09-08` snapshots, also support `xhigh` and `max`. Default: `auto`.One of the following:"low""medium""high""xhigh""max""auto"size: optional string or The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, and `gpt-image-2.5-flare-2026-09-08`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model’s current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.One of the following:stringOne of the following: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`.Shell object { type, allowed_callers, environment } A tool that allows the model to execute shell commands.type: "shell"The type of the shell tool. Always `shell`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:"direct""programmatic"environment: optional or nullOne of the following:ContainerAuto LocalEnvironment ContainerReference Custom object { name, type, allowed_callers, 4 more } A custom tool that processes input using a specified format. Learn more about [custom tools](/api/docs/guides/function-calling#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`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:"direct""programmatic"async: optional booleanWhether the tool response can be returned asynchronously versus immediately returned on next response creation.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 [CustomToolInputFormat](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20custom_tool_input_format%20%3E%20(schema))The input format for the custom tool. Default is unconstrained text.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`).minLength1tools: array of object or objectThe function/custom tools available inside this namespace.One of the following:Function Custom type: "namespace"The type of the tool. Always `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`.description: optional string or nullDescription 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.One of the following:"server""client"parameters: optional unknown or nullParameter 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](/api/docs/guides/tools-web-search).type: "web_search_preview" or "web_search_preview_2025_03_11"The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.One of the following:"web_search_preview""web_search_preview_2025_03_11"search_content_types: optional array of "text" or "image"One of the following:"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`, or `high`. `medium` is the default.One of the following:"low""medium""high"user_location: optional object { } or nullThe user’s location.type: The type of location approximation. Always `approximate`.city: optional or Free text input for the city of the user, e.g. `San Francisco`.country: optional or The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.region: optional or Free text input for the region of the user, e.g. `California`.timezone: optional or The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.ApplyPatch object { type, allowed_callers } Allows the assistant to create, delete, or update files using unified diffs.type: "apply_patch"The type of the tool. Always `apply_patch`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:"direct""programmatic"top_p: optional numberAn alternative to temperature for nucleus sampling; 1.0 includes all tokens.error: [EvalAPIError](/api/reference/resources/evals#(resource)%20evals.runs%20%3E%20(model)%20eval_api_error%20%3E%20(schema)) { code, message } An object representing an error response from the Eval API.eval_id: stringThe identifier of the associated evaluation.metadata: [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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”.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.formaturiresult_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. RunDeleteResponse object { deleted, object, run_id } deleted: optional booleanobject: optional stringrun_id: optional string RunListResponse object { id, created_at, data_source, 11 more } A schema representing an evaluation run.id: stringUnique identifier for the evaluation run.created_at: numberUnix timestamp (in seconds) when the evaluation run was created.formatunixtimedata_source: [CreateEvalJSONLRunDataSource](/api/reference/resources/evals#(resource)%20evals.runs%20%3E%20(model)%20create_eval_jsonl_run_data_source%20%3E%20(schema)) { source, type } or [CreateEvalCompletionsRunDataSource](/api/reference/resources/evals#(resource)%20evals.runs%20%3E%20(model)%20create_eval_completions_run_data_source%20%3E%20(schema)) { source, type, input_messages, 2 more } or object { source, type, input_messages, 2 more } Information about the run’s data source.One of the following:CreateEvalJSONLRunDataSource object { source, type } A JsonlRunDataSource object with that specifies a JSONL file that matches the evalsource: object { content, type } or object { id, type } Determines what populates the `item` namespace in the data source.One of the following: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`.EvalJSONLFileIDSource object { id, type } id: stringThe identifier of the file.type: "file_id"The type of jsonl source. Always `file_id`.type: "jsonl"The type of data source. Always `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 `item` namespace in this run’s data source.One of the following: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`.EvalJSONLFileIDSource object { id, type } id: stringThe identifier of the file.type: "file_id"The type of jsonl source. Always `file_id`.StoredCompletionsRunDataSource object { type, created_after, created_before, 3 more } A StoredCompletionsRunDataSource configuration describing a set of filterstype: "stored_completions"The type of source. Always `stored_completions`.created_after: optional number or nullAn optional Unix timestamp to filter items created after this time.created_before: optional number or nullAn optional Unix timestamp to filter items created before this time.limit: optional number or nullAn optional maximum number of items to return.metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 string or nullAn optional model to filter by (e.g., ‘gpt-6-astra’).type: "completions"The type of run data source. Always `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 the `item` namespace.One of the following:TemplateInputMessages object { template, type } template: array of [EasyInputMessage](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20easy_input_message%20%3E%20(schema)) { content, role, phase, type } or object { content, role, type } A list of chat messages forming the prompt or context. May include variable references to the `item` namespace, ie {{item.name}}.One of the following:EasyInputMessage object { content, role, phase, type } A message input to the model with a role indicating instruction following hierarchy. Instructions given with the `developer` or `system` role take precedence over instructions given with the `user` role. Messages with the `assistant` role are presumed to have been generated by the model in previous interactions.: One of the following:: One of the following:: optional One of the following:type: optional The type of the message input. Always `message`.EvalMessageObject object { content, role, type } A message input to the model with a role indicating instruction following hierarchy. Instructions given with the `developer` or `system` role take precedence over instructions given with the `user` role. Messages with the `assistant` role are presumed to have been generated by the model in previous interactions.: One of the following:: One of the following:type: optional The type of the message input. Always `message`.type: "template"The type of input messages. Always `template`.ItemReferenceInputMessages object { item_reference, type } item_reference: stringA reference to a variable in the `item` namespace. Ie, “item.input_trajectory”type: "item_reference"The type of input messages. Always `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 [ReasoningEffort](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20reasoning_effort%20%3E%20(schema)) or nullConstrains effort on reasoning for reasoning models. Currently supported values are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. Not all reasoning models support every value. See the [reasoning guide](/api/docs/guides/reasoning) for model-specific support.response_format: optional [ResponseFormatText](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20response_format_text%20%3E%20(schema)) { type } or [ResponseFormatJSONSchema](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20response_format_json_schema%20%3E%20(schema)) { json_schema, type } or [ResponseFormatJSONObject](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20response_format_json_object%20%3E%20(schema)) { type } An 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](/api/docs/guides/structured-outputs). Setting to `{ "type": "json_object" }` enables the older JSON mode, which ensures the message the model generates is valid JSON. Using `json_schema` is preferred for models that support it.One of the following:ResponseFormatText object { type } Default response format. Used to generate text responses.type: "text"The type of response format being defined. Always `text`.ResponseFormatJSONSchema object { json_schema, type } JSON Schema response format. Used to generate structured JSON responses. Learn more about [Structured Outputs](/api/docs/guides/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](https://json-schema.org/).strict: optional or Whether to enable strict schema adherence when generating the output. If set to true, the model will always follow the exact schema defined in the `schema` field. Only a subset of JSON Schema is supported when `strict` is `true`. To learn more, read the [Structured Outputs guide](/api/docs/guides/structured-outputs).type: "json_schema"The type of response format being defined. Always `json_schema`.ResponseFormatJSONObject object { type } JSON object response format. An older method of generating JSON responses. Using `json_schema` is 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`.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 [ChatCompletionFunctionTool](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_function_tool%20%3E%20(schema)) { function, type } A 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](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20function_definition%20%3E%20(schema)) { name, description, parameters, strict } type: "function"The type of the tool. Currently, only `function` is supported.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 `item` namespace in this run’s data source.One of the following: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`.EvalJSONLFileIDSource object { id, type } id: stringThe identifier of the file.type: "file_id"The type of jsonl source. Always `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`.created_after: optional number or nullOnly include items created after this timestamp (inclusive). This is a query parameter used to select responses.minimum0created_before: optional number or nullOnly include items created before this timestamp (inclusive). This is a query parameter used to select responses.minimum0instructions_search: optional string or nullOptional string to search the ‘instructions’ field. This is a query parameter used to select responses.metadata: optional unknown or nullMetadata filter for the responses. This is a query parameter used to select responses.model: optional string or nullThe name of the model to find responses for. This is a query parameter used to select responses.reasoning_effort: optional [ReasoningEffort](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20reasoning_effort%20%3E%20(schema)) or nullConstrains effort on reasoning for reasoning models. Currently supported values are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. Not all reasoning models support every value. See the [reasoning guide](/api/docs/guides/reasoning) for model-specific support.temperature: optional number or nullSampling temperature. This is a query parameter used to select responses.tools: optional array of string or nullList of tool names. This is a query parameter used to select responses.top_p: optional number or nullNucleus sampling parameter. This is a query parameter used to select responses.users: optional array of string or nullList of user identifiers. This is a query parameter used to select responses.type: "responses"The type of run data source. Always `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 the `item` namespace.One of the following: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 `item` namespace, ie {{item.name}}.One of the following: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 `developer` or `system` role take precedence over instructions given with the `user` role. Messages with the `assistant` role are presumed to have been generated by the model in previous interactions.: One of the following:: One of the following:type: optional The type of the message input. Always `message`.type: "template"The type of input messages. Always `template`.InputMessagesItemReference object { item_reference, type } item_reference: stringA reference to a variable in the `item` namespace. Ie, “item.name”type: "item_reference"The type of input messages. Always `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 [ReasoningEffort](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20reasoning_effort%20%3E%20(schema)) or nullConstrains effort on reasoning for reasoning models. Currently supported values are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. Not all reasoning models support every value. See the [reasoning guide](/api/docs/guides/reasoning) for model-specific support.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: [Text inputs and outputs](/api/docs/guides/text) [Structured Outputs](/api/docs/guides/structured-outputs) format: optional [ResponseFormatTextConfig](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_format_text_config%20%3E%20(schema))An 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](/api/docs/guides/structured-outputs). 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. Using `json_schema` is preferred for models that support it.tools: optional array of object { name, parameters, strict, 6 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 13 moreAn array of tools the model may call while generating a response. You can specify which tool to use by setting the `tool_choice` parameter. 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](/api/docs/guides/tools-web-search) or [file search](/api/docs/guides/tools-file-search). Learn more about [built-in tools](/api/docs/guides/tools). **Function calls (custom tools)**: Functions that are defined by you, enabling the model to call your own code. Learn more about [function calling](/api/docs/guides/function-calling). One of the following:Function object { name, parameters, strict, 6 more } Defines a function in your own code the model can choose to call. Learn more about [function calling](/api/docs/guides/function-calling).name: stringThe name of the function to call.parameters: map[unknown] or nullA JSON schema object describing the parameters of the function.strict: boolean or nullWhether strict parameter validation is enforced for this function tool.type: "function"The type of the function tool. Always `function`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:"direct""programmatic"async: optional booleandefer_loading: optional booleanWhether this function is deferred and loaded via tool search.description: optional string or nullA description of the function. Used by the model to determine whether or not to call the function.output_schema: optional map[unknown] or nullA JSON schema object describing the JSON value encoded in string outputs for this 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](/api/docs/guides/tools-file-search).type: "file_search"The type of the file search tool. Always `file_search`.vector_store_ids: array of stringThe IDs of the vector stores to search.filters: optional or nullA filter to apply.One of the following:ComparisonFilter CompoundFilter 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.: optional : optional One of the following: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](/api/docs/guides/tools-computer-use).type: "computer"The type of the computer tool. Always `computer`.ComputerUsePreview object { display_height, display_width, environment, type } A tool that controls a virtual computer. Learn more about the [computer tool](/api/docs/guides/tools-computer-use).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.One of the following:"windows""mac""linux""ubuntu""browser"type: "computer_use_preview"The type of the computer use tool. Always `computer_use_preview`.WebSearch object { type, external_web_access, filters, 2 more } Search the Internet for sources related to the prompt. Learn more about the [web search tool](/api/docs/guides/tools-web-search).type: "web_search" or "web_search_2025_08_26"The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.One of the following:"web_search""web_search_2025_08_26"external_web_access: optional booleanAllow live internet access for web search. Defaults to true when omitted. When false, the web search tool runs in offline/cache-only mode and will not fetch new external content.filters: optional object { } or nullFilters for the search.allowed_domains: optional or Allowed 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`, or `high`. `medium` is the default.One of the following:"low""medium""high"user_location: optional object { } or nullThe approximate location of the user.city: optional or Free text input for the city of the user, e.g. `San Francisco`.country: optional or The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.region: optional or Free text input for the region of the user, e.g. `California`.timezone: optional or The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.type: optional The type of location approximation. Always `approximate`.Mcp object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol (MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-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`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:"direct""programmatic"allowed_tools: optional or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter 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`, or `tunnel_id` must be provided. Learn more about service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values 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` One of the following:"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] or nullOptional HTTP headers to send to the MCP server. Use for authentication or other purposes.require_approval: optional or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter McpToolApprovalSetting = One of the following: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`, or `tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of `server_url`, `connector_id`, or `tunnel_id` must be provided.CodeInterpreter object { container, type, allowed_callers } A tool that runs Python code to help generate a response to a prompt.container: string or object { } 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_limit` setting.One of the following:stringThe container ID.CodeInterpreterToolAuto type: "code_interpreter"The type of the code interpreter tool. Always `code_interpreter`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:"direct""programmatic"ProgrammaticToolCalling object { type } type: "programmatic_tool_calling"The type of the tool. Always `programmatic_tool_calling`.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`.action: optional "generate" or "edit" or "auto"Whether to generate a new image or edit an existing image. Default: `auto`.One of the following:"generate""edit""auto"background: optional "transparent" or "opaque" or "auto"Set the background of the generated image. One of `transparent`, `opaque`, or `auto`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including their `2026-09-08` snapshots, support `opaque` and `transparent` backgrounds. Transparent backgrounds are available for supported GPT Image models. For `gpt-image-2` and `gpt-image-2-2026-04-21`, this support is in preview. When using `transparent`, set the output format to `png` or `webp`. Default: `auto`.One of the following:"transparent""opaque""auto"input_fidelity: optional or nullControl 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-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`.One of the following:"high""low"input_image_mask: optional object { file_id, image_url } Optional mask for inpainting. Contains `image_url` (string, optional) and `file_id` (string, optional).file_id: optional stringFile ID for the mask image.image_url: optional stringBase64-encoded mask image.model: optional string or The image generation model to use. One of `gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`. Default: `gpt-image-1`.One of the following:stringOne of the following:moderation: optional "auto" or "low"Moderation level for the generated image. Default: `auto`.One of the following:"auto""low"output_compression: optional numberCompression level for the output image. Default: 100.minimum0maximum100output_format: optional "png" or "webp" or "jpeg"The output format of the generated image. One of `png`, `webp`, or `jpeg`. Default: `png`.One of the following:"png""webp""jpeg"partial_images: optional numberNumber of partial images to generate in streaming mode, from 0 (default value) to 3.minimum0maximum3quality: optional "low" or "medium" or "high" or 3 moreThe quality of the generated image. The GPT image models support `low`, `medium`, and `high`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including their `2026-09-08` snapshots, also support `xhigh` and `max`. Default: `auto`.One of the following:"low""medium""high""xhigh""max""auto"size: optional string or The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, and `gpt-image-2.5-flare-2026-09-08`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model’s current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.One of the following:stringOne of the following: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`.Shell object { type, allowed_callers, environment } A tool that allows the model to execute shell commands.type: "shell"The type of the shell tool. Always `shell`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:"direct""programmatic"environment: optional or nullOne of the following:ContainerAuto LocalEnvironment ContainerReference Custom object { name, type, allowed_callers, 4 more } A custom tool that processes input using a specified format. Learn more about [custom tools](/api/docs/guides/function-calling#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`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:"direct""programmatic"async: optional booleanWhether the tool response can be returned asynchronously versus immediately returned on next response creation.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 [CustomToolInputFormat](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20custom_tool_input_format%20%3E%20(schema))The input format for the custom tool. Default is unconstrained text.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`).minLength1tools: array of object or objectThe function/custom tools available inside this namespace.One of the following:Function Custom type: "namespace"The type of the tool. Always `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`.description: optional string or nullDescription 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.One of the following:"server""client"parameters: optional unknown or nullParameter 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](/api/docs/guides/tools-web-search).type: "web_search_preview" or "web_search_preview_2025_03_11"The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.One of the following:"web_search_preview""web_search_preview_2025_03_11"search_content_types: optional array of "text" or "image"One of the following:"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`, or `high`. `medium` is the default.One of the following:"low""medium""high"user_location: optional object { } or nullThe user’s location.type: The type of location approximation. Always `approximate`.city: optional or Free text input for the city of the user, e.g. `San Francisco`.country: optional or The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.region: optional or Free text input for the region of the user, e.g. `California`.timezone: optional or The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.ApplyPatch object { type, allowed_callers } Allows the assistant to create, delete, or update files using unified diffs.type: "apply_patch"The type of the tool. Always `apply_patch`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:"direct""programmatic"top_p: optional numberAn alternative to temperature for nucleus sampling; 1.0 includes all tokens.error: [EvalAPIError](/api/reference/resources/evals#(resource)%20evals.runs%20%3E%20(model)%20eval_api_error%20%3E%20(schema)) { code, message } An object representing an error response from the Eval API.eval_id: stringThe identifier of the associated evaluation.metadata: [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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”.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.formaturiresult_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. RunRetrieveResponse object { id, created_at, data_source, 11 more } A schema representing an evaluation run.id: stringUnique identifier for the evaluation run.created_at: numberUnix timestamp (in seconds) when the evaluation run was created.formatunixtimedata_source: [CreateEvalJSONLRunDataSource](/api/reference/resources/evals#(resource)%20evals.runs%20%3E%20(model)%20create_eval_jsonl_run_data_source%20%3E%20(schema)) { source, type } or [CreateEvalCompletionsRunDataSource](/api/reference/resources/evals#(resource)%20evals.runs%20%3E%20(model)%20create_eval_completions_run_data_source%20%3E%20(schema)) { source, type, input_messages, 2 more } or object { source, type, input_messages, 2 more } Information about the run’s data source.One of the following:CreateEvalJSONLRunDataSource object { source, type } A JsonlRunDataSource object with that specifies a JSONL file that matches the evalsource: object { content, type } or object { id, type } Determines what populates the `item` namespace in the data source.One of the following: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`.EvalJSONLFileIDSource object { id, type } id: stringThe identifier of the file.type: "file_id"The type of jsonl source. Always `file_id`.type: "jsonl"The type of data source. Always `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 `item` namespace in this run’s data source.One of the following: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`.EvalJSONLFileIDSource object { id, type } id: stringThe identifier of the file.type: "file_id"The type of jsonl source. Always `file_id`.StoredCompletionsRunDataSource object { type, created_after, created_before, 3 more } A StoredCompletionsRunDataSource configuration describing a set of filterstype: "stored_completions"The type of source. Always `stored_completions`.created_after: optional number or nullAn optional Unix timestamp to filter items created after this time.created_before: optional number or nullAn optional Unix timestamp to filter items created before this time.limit: optional number or nullAn optional maximum number of items to return.metadata: optional [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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 string or nullAn optional model to filter by (e.g., ‘gpt-6-astra’).type: "completions"The type of run data source. Always `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 the `item` namespace.One of the following:TemplateInputMessages object { template, type } template: array of [EasyInputMessage](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20easy_input_message%20%3E%20(schema)) { content, role, phase, type } or object { content, role, type } A list of chat messages forming the prompt or context. May include variable references to the `item` namespace, ie {{item.name}}.One of the following:EasyInputMessage object { content, role, phase, type } A message input to the model with a role indicating instruction following hierarchy. Instructions given with the `developer` or `system` role take precedence over instructions given with the `user` role. Messages with the `assistant` role are presumed to have been generated by the model in previous interactions.: One of the following:: One of the following:: optional One of the following:type: optional The type of the message input. Always `message`.EvalMessageObject object { content, role, type } A message input to the model with a role indicating instruction following hierarchy. Instructions given with the `developer` or `system` role take precedence over instructions given with the `user` role. Messages with the `assistant` role are presumed to have been generated by the model in previous interactions.: One of the following:: One of the following:type: optional The type of the message input. Always `message`.type: "template"The type of input messages. Always `template`.ItemReferenceInputMessages object { item_reference, type } item_reference: stringA reference to a variable in the `item` namespace. Ie, “item.input_trajectory”type: "item_reference"The type of input messages. Always `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 [ReasoningEffort](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20reasoning_effort%20%3E%20(schema)) or nullConstrains effort on reasoning for reasoning models. Currently supported values are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. Not all reasoning models support every value. See the [reasoning guide](/api/docs/guides/reasoning) for model-specific support.response_format: optional [ResponseFormatText](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20response_format_text%20%3E%20(schema)) { type } or [ResponseFormatJSONSchema](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20response_format_json_schema%20%3E%20(schema)) { json_schema, type } or [ResponseFormatJSONObject](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20response_format_json_object%20%3E%20(schema)) { type } An 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](/api/docs/guides/structured-outputs). Setting to `{ "type": "json_object" }` enables the older JSON mode, which ensures the message the model generates is valid JSON. Using `json_schema` is preferred for models that support it.One of the following:ResponseFormatText object { type } Default response format. Used to generate text responses.type: "text"The type of response format being defined. Always `text`.ResponseFormatJSONSchema object { json_schema, type } JSON Schema response format. Used to generate structured JSON responses. Learn more about [Structured Outputs](/api/docs/guides/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](https://json-schema.org/).strict: optional or Whether to enable strict schema adherence when generating the output. If set to true, the model will always follow the exact schema defined in the `schema` field. Only a subset of JSON Schema is supported when `strict` is `true`. To learn more, read the [Structured Outputs guide](/api/docs/guides/structured-outputs).type: "json_schema"The type of response format being defined. Always `json_schema`.ResponseFormatJSONObject object { type } JSON object response format. An older method of generating JSON responses. Using `json_schema` is 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`.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 [ChatCompletionFunctionTool](/api/reference/resources/chat#(resource)%20chat.completions%20%3E%20(model)%20chat_completion_function_tool%20%3E%20(schema)) { function, type } A 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](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20function_definition%20%3E%20(schema)) { name, description, parameters, strict } type: "function"The type of the tool. Currently, only `function` is supported.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 `item` namespace in this run’s data source.One of the following: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`.EvalJSONLFileIDSource object { id, type } id: stringThe identifier of the file.type: "file_id"The type of jsonl source. Always `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`.created_after: optional number or nullOnly include items created after this timestamp (inclusive). This is a query parameter used to select responses.minimum0created_before: optional number or nullOnly include items created before this timestamp (inclusive). This is a query parameter used to select responses.minimum0instructions_search: optional string or nullOptional string to search the ‘instructions’ field. This is a query parameter used to select responses.metadata: optional unknown or nullMetadata filter for the responses. This is a query parameter used to select responses.model: optional string or nullThe name of the model to find responses for. This is a query parameter used to select responses.reasoning_effort: optional [ReasoningEffort](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20reasoning_effort%20%3E%20(schema)) or nullConstrains effort on reasoning for reasoning models. Currently supported values are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. Not all reasoning models support every value. See the [reasoning guide](/api/docs/guides/reasoning) for model-specific support.temperature: optional number or nullSampling temperature. This is a query parameter used to select responses.tools: optional array of string or nullList of tool names. This is a query parameter used to select responses.top_p: optional number or nullNucleus sampling parameter. This is a query parameter used to select responses.users: optional array of string or nullList of user identifiers. This is a query parameter used to select responses.type: "responses"The type of run data source. Always `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 the `item` namespace.One of the following: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 `item` namespace, ie {{item.name}}.One of the following: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 `developer` or `system` role take precedence over instructions given with the `user` role. Messages with the `assistant` role are presumed to have been generated by the model in previous interactions.: One of the following:: One of the following:type: optional The type of the message input. Always `message`.type: "template"The type of input messages. Always `template`.InputMessagesItemReference object { item_reference, type } item_reference: stringA reference to a variable in the `item` namespace. Ie, “item.name”type: "item_reference"The type of input messages. Always `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 [ReasoningEffort](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20reasoning_effort%20%3E%20(schema)) or nullConstrains effort on reasoning for reasoning models. Currently supported values are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. Not all reasoning models support every value. See the [reasoning guide](/api/docs/guides/reasoning) for model-specific support.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: [Text inputs and outputs](/api/docs/guides/text) [Structured Outputs](/api/docs/guides/structured-outputs) format: optional [ResponseFormatTextConfig](/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_format_text_config%20%3E%20(schema))An 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](/api/docs/guides/structured-outputs). 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. Using `json_schema` is preferred for models that support it.tools: optional array of object { name, parameters, strict, 6 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 13 moreAn array of tools the model may call while generating a response. You can specify which tool to use by setting the `tool_choice` parameter. 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](/api/docs/guides/tools-web-search) or [file search](/api/docs/guides/tools-file-search). Learn more about [built-in tools](/api/docs/guides/tools). **Function calls (custom tools)**: Functions that are defined by you, enabling the model to call your own code. Learn more about [function calling](/api/docs/guides/function-calling). One of the following:Function object { name, parameters, strict, 6 more } Defines a function in your own code the model can choose to call. Learn more about [function calling](/api/docs/guides/function-calling).name: stringThe name of the function to call.parameters: map[unknown] or nullA JSON schema object describing the parameters of the function.strict: boolean or nullWhether strict parameter validation is enforced for this function tool.type: "function"The type of the function tool. Always `function`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:"direct""programmatic"async: optional booleandefer_loading: optional booleanWhether this function is deferred and loaded via tool search.description: optional string or nullA description of the function. Used by the model to determine whether or not to call the function.output_schema: optional map[unknown] or nullA JSON schema object describing the JSON value encoded in string outputs for this 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](/api/docs/guides/tools-file-search).type: "file_search"The type of the file search tool. Always `file_search`.vector_store_ids: array of stringThe IDs of the vector stores to search.filters: optional or nullA filter to apply.One of the following:ComparisonFilter CompoundFilter 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.: optional : optional One of the following: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](/api/docs/guides/tools-computer-use).type: "computer"The type of the computer tool. Always `computer`.ComputerUsePreview object { display_height, display_width, environment, type } A tool that controls a virtual computer. Learn more about the [computer tool](/api/docs/guides/tools-computer-use).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.One of the following:"windows""mac""linux""ubuntu""browser"type: "computer_use_preview"The type of the computer use tool. Always `computer_use_preview`.WebSearch object { type, external_web_access, filters, 2 more } Search the Internet for sources related to the prompt. Learn more about the [web search tool](/api/docs/guides/tools-web-search).type: "web_search" or "web_search_2025_08_26"The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.One of the following:"web_search""web_search_2025_08_26"external_web_access: optional booleanAllow live internet access for web search. Defaults to true when omitted. When false, the web search tool runs in offline/cache-only mode and will not fetch new external content.filters: optional object { } or nullFilters for the search.allowed_domains: optional or Allowed 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`, or `high`. `medium` is the default.One of the following:"low""medium""high"user_location: optional object { } or nullThe approximate location of the user.city: optional or Free text input for the city of the user, e.g. `San Francisco`.country: optional or The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.region: optional or Free text input for the region of the user, e.g. `California`.timezone: optional or The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.type: optional The type of location approximation. Always `approximate`.Mcp object { server_label, type, allowed_callers, 9 more } Give the model access to additional tools via remote Model Context Protocol (MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-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`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:"direct""programmatic"allowed_tools: optional or nullList of allowed tool names or a filter object.One of the following:McpAllowedTools = array of stringA string array of allowed tool namesMcpToolFilter 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`, or `tunnel_id` must be provided. Learn more about service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values 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` One of the following:"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] or nullOptional HTTP headers to send to the MCP server. Use for authentication or other purposes.require_approval: optional or nullSpecify which of the MCP server’s tools require approval.One of the following:McpToolApprovalFilter McpToolApprovalSetting = One of the following: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`, or `tunnel_id` must be provided.formaturitunnel_id: optional stringThe Secure MCP Tunnel ID to use instead of a direct server URL. One of `server_url`, `connector_id`, or `tunnel_id` must be provided.CodeInterpreter object { container, type, allowed_callers } A tool that runs Python code to help generate a response to a prompt.container: string or object { } 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_limit` setting.One of the following:stringThe container ID.CodeInterpreterToolAuto type: "code_interpreter"The type of the code interpreter tool. Always `code_interpreter`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:"direct""programmatic"ProgrammaticToolCalling object { type } type: "programmatic_tool_calling"The type of the tool. Always `programmatic_tool_calling`.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`.action: optional "generate" or "edit" or "auto"Whether to generate a new image or edit an existing image. Default: `auto`.One of the following:"generate""edit""auto"background: optional "transparent" or "opaque" or "auto"Set the background of the generated image. One of `transparent`, `opaque`, or `auto`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including their `2026-09-08` snapshots, support `opaque` and `transparent` backgrounds. Transparent backgrounds are available for supported GPT Image models. For `gpt-image-2` and `gpt-image-2-2026-04-21`, this support is in preview. When using `transparent`, set the output format to `png` or `webp`. Default: `auto`.One of the following:"transparent""opaque""auto"input_fidelity: optional or nullControl 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-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`.One of the following:"high""low"input_image_mask: optional object { file_id, image_url } Optional mask for inpainting. Contains `image_url` (string, optional) and `file_id` (string, optional).file_id: optional stringFile ID for the mask image.image_url: optional stringBase64-encoded mask image.model: optional string or The image generation model to use. One of `gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`. Default: `gpt-image-1`.One of the following:stringOne of the following:moderation: optional "auto" or "low"Moderation level for the generated image. Default: `auto`.One of the following:"auto""low"output_compression: optional numberCompression level for the output image. Default: 100.minimum0maximum100output_format: optional "png" or "webp" or "jpeg"The output format of the generated image. One of `png`, `webp`, or `jpeg`. Default: `png`.One of the following:"png""webp""jpeg"partial_images: optional numberNumber of partial images to generate in streaming mode, from 0 (default value) to 3.minimum0maximum3quality: optional "low" or "medium" or "high" or 3 moreThe quality of the generated image. The GPT image models support `low`, `medium`, and `high`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including their `2026-09-08` snapshots, also support `xhigh` and `max`. Default: `auto`.One of the following:"low""medium""high""xhigh""max""auto"size: optional string or The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, and `gpt-image-2.5-flare-2026-09-08`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model’s current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.One of the following:stringOne of the following: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`.Shell object { type, allowed_callers, environment } A tool that allows the model to execute shell commands.type: "shell"The type of the shell tool. Always `shell`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:"direct""programmatic"environment: optional or nullOne of the following:ContainerAuto LocalEnvironment ContainerReference Custom object { name, type, allowed_callers, 4 more } A custom tool that processes input using a specified format. Learn more about [custom tools](/api/docs/guides/function-calling#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`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:"direct""programmatic"async: optional booleanWhether the tool response can be returned asynchronously versus immediately returned on next response creation.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 [CustomToolInputFormat](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20custom_tool_input_format%20%3E%20(schema))The input format for the custom tool. Default is unconstrained text.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`).minLength1tools: array of object or objectThe function/custom tools available inside this namespace.One of the following:Function Custom type: "namespace"The type of the tool. Always `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`.description: optional string or nullDescription 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.One of the following:"server""client"parameters: optional unknown or nullParameter 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](/api/docs/guides/tools-web-search).type: "web_search_preview" or "web_search_preview_2025_03_11"The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.One of the following:"web_search_preview""web_search_preview_2025_03_11"search_content_types: optional array of "text" or "image"One of the following:"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`, or `high`. `medium` is the default.One of the following:"low""medium""high"user_location: optional object { } or nullThe user’s location.type: The type of location approximation. Always `approximate`.city: optional or Free text input for the city of the user, e.g. `San Francisco`.country: optional or The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.region: optional or Free text input for the region of the user, e.g. `California`.timezone: optional or The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.ApplyPatch object { type, allowed_callers } Allows the assistant to create, delete, or update files using unified diffs.type: "apply_patch"The type of the tool. Always `apply_patch`.allowed_callers: optional array of or nullThe tool invocation context(s).One of the following:"direct""programmatic"top_p: optional numberAn alternative to temperature for nucleus sampling; 1.0 includes all tokens.error: [EvalAPIError](/api/reference/resources/evals#(resource)%20evals.runs%20%3E%20(model)%20eval_api_error%20%3E%20(schema)) { code, message } An object representing an error response from the Eval API.eval_id: stringThe identifier of the associated evaluation.metadata: [Metadata](/api/reference/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20metadata%20%3E%20(schema)) or nullSet 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”.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.formaturiresult_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. ##### ModelsExpand Collapse OutputItemListResponse object { id, created_at, datasource_item, 7 more } A schema representing an evaluation run output item.id: stringUnique identifier for the evaluation run output item.created_at: numberUnix timestamp (in seconds) when the evaluation run was created.formatunixtimedatasource_item: map[unknown]Details of the input data source item.datasource_item_id: numberThe identifier for the data source item.eval_id: stringThe identifier of the evaluation group.object: "eval.run.output_item"The type of the object. Always “eval.run.output_item”.results: array of object { name, passed, score, 2 more } A list of grader results for this output item.name: stringThe name of the grader.passed: booleanWhether the grader considered the output a pass.score: numberThe numeric score produced by the grader.sample: optional map[unknown] or nullOptional sample or intermediate data produced by the grader.type: optional stringThe grader type (for example, “string-check-grader”).run_id: stringThe identifier of the evaluation run associated with this output item.sample: object { error, finish_reason, input, 7 more } A sample containing the input and output of the evaluation run.error: [EvalAPIError](/api/reference/resources/evals#(resource)%20evals.runs%20%3E%20(model)%20eval_api_error%20%3E%20(schema)) { code, message } An object representing an error response from the Eval API.finish_reason: stringThe reason why the sample generation was finished.input: array of object { content, role } An array of input messages.content: stringThe content of the message.role: stringThe role of the message sender (e.g., system, user, developer).max_completion_tokens: numberThe maximum number of tokens allowed for completion.model: stringThe model used for generating the sample.output: array of object { content, role } An array of output messages.content: optional stringThe content of the message.role: optional stringThe role of the message (e.g. “system”, “assistant”, “user”).seed: numberThe seed used for generating the sample.temperature: numberThe sampling temperature used.top_p: numberThe top_p value used for sampling.usage: object { cached_tokens, completion_tokens, prompt_tokens, total_tokens } Token usage details for the sample.cached_tokens: numberThe number of tokens retrieved from cache.completion_tokens: numberThe number of completion tokens generated.prompt_tokens: numberThe number of prompt tokens used.total_tokens: numberThe total number of tokens used.status: stringThe status of the evaluation run. OutputItemRetrieveResponse object { id, created_at, datasource_item, 7 more } A schema representing an evaluation run output item.id: stringUnique identifier for the evaluation run output item.created_at: numberUnix timestamp (in seconds) when the evaluation run was created.formatunixtimedatasource_item: map[unknown]Details of the input data source item.datasource_item_id: numberThe identifier for the data source item.eval_id: stringThe identifier of the evaluation group.object: "eval.run.output_item"The type of the object. Always “eval.run.output_item”.results: array of object { name, passed, score, 2 more } A list of grader results for this output item.name: stringThe name of the grader.passed: booleanWhether the grader considered the output a pass.score: numberThe numeric score produced by the grader.sample: optional map[unknown] or nullOptional sample or intermediate data produced by the grader.type: optional stringThe grader type (for example, “string-check-grader”).run_id: stringThe identifier of the evaluation run associated with this output item.sample: object { error, finish_reason, input, 7 more } A sample containing the input and output of the evaluation run.error: [EvalAPIError](/api/reference/resources/evals#(resource)%20evals.runs%20%3E%20(model)%20eval_api_error%20%3E%20(schema)) { code, message } An object representing an error response from the Eval API.finish_reason: stringThe reason why the sample generation was finished.input: array of object { content, role } An array of input messages.content: stringThe content of the message.role: stringThe role of the message sender (e.g., system, user, developer).max_completion_tokens: numberThe maximum number of tokens allowed for completion.model: stringThe model used for generating the sample.output: array of object { content, role } An array of output messages.content: optional stringThe content of the message.role: optional stringThe role of the message (e.g. “system”, “assistant”, “user”).seed: numberThe seed used for generating the sample.temperature: numberThe sampling temperature used.top_p: numberThe top_p value used for sampling.usage: object { cached_tokens, completion_tokens, prompt_tokens, total_tokens } Token usage details for the sample.cached_tokens: numberThe number of tokens retrieved from cache.completion_tokens: numberThe number of completion tokens generated.prompt_tokens: numberThe number of prompt tokens used.total_tokens: numberThe total number of tokens used.status: stringThe status of the evaluation run.