The TypeScript SDK and docs are currently in beta.
Report issues on GitHub.
Example Usage
import { ChatJsonSchemaConfig } from "@openrouter/sdk/models";
let value: ChatJsonSchemaConfig = {
name: "math_response",
};
Fields
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
description | string | :heavy_minus_sign: | Schema description for the model | A mathematical response |
name | string | :heavy_check_mark: | Schema name (a-z, A-Z, 0-9, underscores, dashes, max 64 chars) | math_response |
schema | Record<string, *any*> | :heavy_minus_sign: | JSON Schema object | {"properties": {"answer": {"type": "number"}}, “required”: [ “answer” ], “type”: “object” } |
strict | boolean | :heavy_minus_sign: | Enable strict schema adherence | false |