Send a prompt and a JSON Schema to a language model and give a value that the schema accepts
JSON Schemas
{
"input": {
"type": "object",
"properties": {
"prompt": {
"type": "string",
"minLength": 1,
"maxLength": 4000000,
"description": "The text of the user"
},
"system": {
"description": "The system text: the instructions to the model",
"type": "string",
"maxLength": 4000000
},
"model": {
"description": "The model (default: the model of the module, claude-sonnet-5-5)",
"type": "string",
"minLength": 1,
"maxLength": 200,
"pattern": "^[A-Za-z0-9][A-Za-z0-9._:@/-]*$"
},
"maxTokens": {
"description": "The most tokens of the output, with the thinking (default 16000)",
"type": "integer",
"minimum": 1,
"maximum": 64000
},
"temperature": {
"description": "The temperature, 0 to 1. Some models accept only the default",
"type": "number",
"minimum": 0,
"maximum": 1
},
"effort": {
"description": "The effort of the model (default: the default of the model)",
"type": "string",
"enum": [
"low",
"medium",
"high",
"xhigh",
"max"
]
},
"timeoutMs": {
"description": "The time limit of each request, in milliseconds (default 600000)",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 3600000
},
"fallback": {
"description": "True: the API runs a declined request again on its fallback model (default: the option of the module, true)",
"type": "boolean"
},
"schema": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {},
"description": "The JSON Schema of the value"
},
"constrained": {
"description": "True (default): the API constrains the output to the schema. False: the system text gives the schema",
"type": "boolean"
},
"retries": {
"description": "The new tries after an answer that is not valid, 0 to 2 (default 2)",
"type": "integer",
"minimum": 0,
"maximum": 2
},
"requestRetries": {
"description": "The new tries after a retryable error (429, 529, 5xx, a connection error), 0 to 10 (default: the option of the module, 2)",
"type": "integer",
"minimum": 0,
"maximum": 10
}
},
"required": [
"prompt",
"schema"
]
},
"output": {
"type": "object",
"properties": {
"value": {
"description": "The value: the schema accepts it"
},
"model": {
"type": "string",
"description": "The model that gave the value"
},
"attempts": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "The number of calls to the model"
},
"usage": {
"type": "object",
"properties": {
"inputTokens": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "The tokens of the input that the cache did not have"
},
"outputTokens": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "The tokens of the output, with the thinking"
},
"cacheReadInputTokens": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "The tokens of the input from the cache"
},
"cacheCreationInputTokens": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "The tokens of the input that went into the cache"
}
},
"required": [
"inputTokens",
"outputTokens",
"cacheReadInputTokens",
"cacheCreationInputTokens"
],
"additionalProperties": false,
"description": "The tokens of the call"
},
"unchecked": {
"type": "array",
"items": {
"type": "string"
},
"description": "The keywords of the schema that the check does not examine fully"
}
},
"required": [
"value",
"model",
"attempts",
"usage",
"unchecked"
],
"additionalProperties": false
}
}