ChatUserMessage - TypeScript SDK

ChatUserMessage type definition

The TypeScript SDK and docs are currently in beta. Report issues on GitHub.

User message

Example Usage

1import { ChatUserMessage } from "@openrouter/sdk/models";
2
3let value: ChatUserMessage = {
4 content: "What is the capital of France?",
5 role: "user",
6};

Fields

FieldTypeRequiredDescriptionExample
contentmodels.ChatUserMessageContent✔️User message contentWhat is the capital of France?
namestringOptional name for the userUser
role”user”✔️N/A