The TypeScript SDK and docs are currently in beta.
Report issues on GitHub.
Example Usage
import { ChatFormatJsonSchemaConfig } from "@openrouter/sdk/models";
let value: ChatFormatJsonSchemaConfig = {
jsonSchema: {
name: "math_response",
},
type: "json_schema",
};
Fields
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
jsonSchema | models.ChatJsonSchemaConfig | :heavy_check_mark: | JSON Schema configuration object | {"description": "A mathematical response","name": "math_response","schema": {"properties": {"answer": {"type": "number"}}, “required”: [ “answer” ], “type”: “object” }, “strict”: true<br/>} |
type | ”json_schema” | :heavy_check_mark: | N/A |