For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
The TypeScript SDK and docs are currently in beta.
Report issues on GitHub.
Example Usage
1
import { EasyInputMessage } from "@openrouter/sdk/models";
2
3
let value: EasyInputMessage = {
4
role: "user",
5
};
Fields
Field
Type
Required
Description
Example
content
models.EasyInputMessageContentUnion2
➖
N/A
phase
models.EasyInputMessagePhaseUnion
➖
The phase of an assistant message. Use commentary for an intermediate assistant message and final_answer for the final assistant message. For follow-up requests with models like gpt-5.3-codex and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages.