Skip to main content
The TypeScript SDK and docs are currently in beta. Report issues on GitHub.
JSON schema constrained response format

Example Usage

import { FormatJsonSchemaConfig } from "@openrouter/sdk/models";

let value: FormatJsonSchemaConfig = {
  name: "<value>",
  schema: {
    "key": "<value>",
  },
  type: "json_schema",
};

Fields

FieldTypeRequiredDescription
descriptionstring:heavy_minus_sign:N/A
namestring:heavy_check_mark:N/A
schemaRecord<string, *any*>:heavy_check_mark:N/A
strictboolean:heavy_minus_sign:N/A
type”json_schema”:heavy_check_mark:N/A