Saltar al contenido principal
OutputSchema es una estructura recursiva tipo JSON-Schema que describe lo que debe retornar cada nodo. Todo esquema requiere un campo instructions — así el modelo sabe qué extraer para ese slot.

Tipos

TipoRequeridoOpcional
stringinstructionsenum, examples, template, pattern, format
number / integerinstructionsminimum, maximum, exclusiveMinimum, exclusiveMaximum, enum
booleaninstructions
objectinstructions, properties (recursivo)examples, template
arrayinstructions, items (recursivo)minItems, maxItems, examples, template
anyOfinstructions, anyOf (OutputSchema[])
Valores format soportados para string: date-time, date, time, duration, email, uuid, ipv4, ipv6.

Límites

LímiteValor
Profundidad máxima de anidación10
Total máximo de propiedades5,000
Caracteres máximos (nombres + valores enum combinados)120,000
Valores enum máximos en todas las propiedades1,000

Ejemplo — sección objeto

{
  "type": "object",
  "instructions": "Patient vitals",
  "properties": {
    "bloodPressure": {
      "type": "string",
      "instructions": "Systolic/diastolic in mmHg",
      "pattern": "^\\d{2,3}/\\d{2,3}$"
    },
    "heartRate": {
      "type": "integer",
      "instructions": "Beats per minute",
      "minimum": 20,
      "maximum": 300
    }
  }
}

Ejemplo — campo opcional / nullable vía anyOf

{
  "type": "object",
  "instructions": "Symptoms",
  "properties": {
    "fever": {
      "instructions": "Maximum measured temperature in °C, or null if not reported",
      "anyOf": [
        { "type": "number", "minimum": 30, "maximum": 45 },
        { "type": "null" }
      ]
    }
  }
}

Ejemplo — arreglo de items estructurados

{
  "type": "array",
  "instructions": "List of medications mentioned",
  "items": {
    "type": "object",
    "instructions": "One medication entry",
    "properties": {
      "name": { "type": "string", "instructions": "Generic or brand name" },
      "dose": { "type": "string", "instructions": "Dose with unit, e.g. 500 mg" }
    }
  }
}