The TypeScript SDK and docs are currently in beta.
Report issues on GitHub.
Example Usage
import { ChatStreamingResponse } from "@openrouter/sdk/models";
let value: ChatStreamingResponse = {
data: {
choices: [
{
delta: {},
finishReason: null,
index: 0,
},
],
created: 1677652288,
id: "chatcmpl-123",
model: "openai/gpt-4",
object: "chat.completion.chunk",
},
};
Fields
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
data | models.ChatStreamChunk | :heavy_check_mark: | Streaming chat completion chunk | {"choices": [{"delta": {"content": "Hello","role": "assistant"},“finish_reason”: null, “index”: 0<br/>}], “created”: 1677652288, “id”: “chatcmpl-123”, “model”: “openai/gpt-4”, “object”: “chat.completion.chunk” } |