@squidcloud/client
    Preparing search index...

    Interface AiStructuredOutputFormat

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

    When used with supported Anthropic models (claude-sonnet-4-5-20250929, claude-opus-4-1-20250805), this guarantees that responses will strictly conform to the provided JSON schema through constrained decoding - the model cannot generate tokens that violate the schema.

    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

    Properties

    Properties

    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. Currently only 'json_schema' is supported by Anthropic models.