> ## Documentation Index
> Fetch the complete documentation index at: https://openrouter.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# ChatGenerationParams - TypeScript SDK

> ChatGenerationParams method reference

<Warning>
  The TypeScript SDK and docs are currently in beta.
  Report issues on [GitHub](https://github.com/OpenRouterTeam/typescript-sdk/issues).
</Warning>

## Example Usage

```typescript lines theme={null}
import { ChatGenerationParams } from "@openrouter/sdk/models";

let value: ChatGenerationParams = {
  messages: [
    {
      role: "system",
      content: "<value>",
    },
  ],
};
```

## Fields

| Field                 | Type                                                                                             | Required             | Description                                                                                                                                                                                                                                 |
| --------------------- | ------------------------------------------------------------------------------------------------ | -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `provider`            | [models.ChatGenerationParamsProvider](/agent-sdk/typescript/models/chatgenerationparamsprovider) | :heavy\_minus\_sign: | When multiple model providers are available, optionally indicate your routing preference.                                                                                                                                                   |
| `plugins`             | *models.ChatGenerationParamsPluginUnion*\[]                                                      | :heavy\_minus\_sign: | Plugins you want to enable for this request, including their settings.                                                                                                                                                                      |
| `route`               | [models.Route](/agent-sdk/typescript/models/route)                                               | :heavy\_minus\_sign: | N/A                                                                                                                                                                                                                                         |
| `user`                | *string*                                                                                         | :heavy\_minus\_sign: | N/A                                                                                                                                                                                                                                         |
| `sessionId`           | *string*                                                                                         | :heavy\_minus\_sign: | A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 128 characters. |
| `messages`            | *models.Message*\[]                                                                              | :heavy\_check\_mark: | N/A                                                                                                                                                                                                                                         |
| `model`               | *string*                                                                                         | :heavy\_minus\_sign: | N/A                                                                                                                                                                                                                                         |
| `models`              | *string*\[]                                                                                      | :heavy\_minus\_sign: | N/A                                                                                                                                                                                                                                         |
| `frequencyPenalty`    | *number*                                                                                         | :heavy\_minus\_sign: | N/A                                                                                                                                                                                                                                         |
| `logitBias`           | `Record<string, *number*>`                                                                       | :heavy\_minus\_sign: | N/A                                                                                                                                                                                                                                         |
| `logprobs`            | *boolean*                                                                                        | :heavy\_minus\_sign: | N/A                                                                                                                                                                                                                                         |
| `topLogprobs`         | *number*                                                                                         | :heavy\_minus\_sign: | N/A                                                                                                                                                                                                                                         |
| `maxCompletionTokens` | *number*                                                                                         | :heavy\_minus\_sign: | N/A                                                                                                                                                                                                                                         |
| `maxTokens`           | *number*                                                                                         | :heavy\_minus\_sign: | N/A                                                                                                                                                                                                                                         |
| `metadata`            | `Record<string, *string*>`                                                                       | :heavy\_minus\_sign: | N/A                                                                                                                                                                                                                                         |
| `presencePenalty`     | *number*                                                                                         | :heavy\_minus\_sign: | N/A                                                                                                                                                                                                                                         |
| `reasoning`           | [models.Reasoning](/agent-sdk/typescript/models/reasoning)                                       | :heavy\_minus\_sign: | N/A                                                                                                                                                                                                                                         |
| `responseFormat`      | *models.ChatGenerationParamsResponseFormatUnion*                                                 | :heavy\_minus\_sign: | N/A                                                                                                                                                                                                                                         |
| `seed`                | *number*                                                                                         | :heavy\_minus\_sign: | N/A                                                                                                                                                                                                                                         |
| `stop`                | *models.ChatGenerationParamsStop*                                                                | :heavy\_minus\_sign: | N/A                                                                                                                                                                                                                                         |
| `stream`              | *boolean*                                                                                        | :heavy\_minus\_sign: | N/A                                                                                                                                                                                                                                         |
| `streamOptions`       | [models.ChatStreamOptions](/agent-sdk/typescript/models/chatstreamoptions)                       | :heavy\_minus\_sign: | N/A                                                                                                                                                                                                                                         |
| `temperature`         | *number*                                                                                         | :heavy\_minus\_sign: | N/A                                                                                                                                                                                                                                         |
| `toolChoice`          | *any*                                                                                            | :heavy\_minus\_sign: | N/A                                                                                                                                                                                                                                         |
| `tools`               | [models.ToolDefinitionJson](/agent-sdk/typescript/models/tooldefinitionjson)\[]                  | :heavy\_minus\_sign: | N/A                                                                                                                                                                                                                                         |
| `topP`                | *number*                                                                                         | :heavy\_minus\_sign: | N/A                                                                                                                                                                                                                                         |
| `debug`               | [models.Debug](/agent-sdk/typescript/models/debug)                                               | :heavy\_minus\_sign: | N/A                                                                                                                                                                                                                                         |
| `imageConfig`         | `Record<string, *models.ChatGenerationParamsImageConfig*>`                                       | :heavy\_minus\_sign: | N/A                                                                                                                                                                                                                                         |
| `modalities`          | [models.Modality](/agent-sdk/typescript/models/modality)\[]                                      | :heavy\_minus\_sign: | N/A                                                                                                                                                                                                                                         |
