The TypeScript SDK and docs are currently in beta.
Report issues on GitHub.
Example Usage
import { InputsMessage } from "@openrouter/sdk/models";
let value: InputsMessage = {
content: [
{
text: "Hello! How can I help you?",
type: "output_text",
},
],
id: "msg-123",
role: "assistant",
type: "message",
};
Fields
| Field | Type | Required | Description |
|---|---|---|---|
content | models.InputsContent2 | :heavy_check_mark: | N/A |
id | string | :heavy_check_mark: | N/A |
phase | models.InputsPhaseUnion | :heavy_minus_sign: | 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. |
role | models.InputsRole | :heavy_check_mark: | N/A |
status | models.InputsStatusUnion1 | :heavy_minus_sign: | N/A |
type | models.InputsTypeMessage | :heavy_check_mark: | N/A |