An object specifying the format that the model must output. Setting to json_schema enables Structured Outputs which ensures the model will match your supplied JSON schema.
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "#/components/schemas/ResponseFormat",
"title": "ResponseFormat",
"type": "object",
"description": "An object specifying the format that the model must output.\nSetting to json_schema enables Structured Outputs which ensures\nthe model will match your supplied JSON schema.\n",
"properties": {
"type": {
"type": "string",
"description": "The type of response format.",
"enum": [
"text",
"json_object",
"json_schema"
],
"example": "text"
},
"json_schema": {
"type": "object",
"description": "The JSON schema the model must conform to. Required when\ntype is json_schema.\n",
"properties": {
"name": {
"type": "string",
"description": "The name of the response format."
},
"description": {
"type": "string",
"description": "A description of the response format."
},
"schema": {
"type": "object",
"description": "The JSON schema object."
},
"strict": {
"type": "boolean",
"description": "Whether strict schema adherence is enabled.",
"default": false
}
},
"example": "example_value"
}
}
}
Discovery needs no key. Ratings and market analysis are Pro.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. See our Privacy Policy and
Terms.