@squidcloud/client
    Preparing search index...

    Interface AiStructuredOutputFormat

    Structured output format configuration for AI models that support schema-constrained responses.

    The schema is sent to the model's provider, which constrains decoding to it - the model cannot generate tokens that violate the schema, so the response conforms to it exactly.

    A schema the provider rejects is reported as a 400 carrying its diagnostic, and a model whose protocol cannot carry a schema at all refuses the request with STRUCTURED_OUTPUT_NOT_SUPPORTED rather than answering without the shape that was asked for. Example:

    {
    type: 'json_schema',
    schema: {
    type: 'object',
    properties: {
    name: { type: 'string' },
    age: { type: 'number' }
    },
    required: ['name', 'age'],
    additionalProperties: false
    }
    }
    interface AiStructuredOutputFormat {
        schema: JSONSchema;
        type: "json_schema";
    }
    Index
    schema: JSONSchema

    The JSON schema that the AI response must strictly conform to. Uses constrained decoding to guarantee schema compliance.

    type: "json_schema"

    The type of structured output. 'json_schema' is the only one.