Skip to main content
The TypeScript SDK and docs are currently in beta. Report issues on GitHub.
Stored prompt and completion content

Example Usage

import { GenerationContentData } from "@openrouter/sdk/models";

let value: GenerationContentData = {
  input: {
    messages: [
      {
        "content": "What is the meaning of life?",
        "role": "user",
      },
    ],
  },
  output: {
    completion: "The meaning of life is a philosophical question...",
    reasoning: null,
  },
};

Fields

FieldTypeRequiredDescription
inputmodels.InputUnion:heavy_check_mark:The input to the generation — either a prompt string or an array of messages
outputmodels.GenerationContentDataOutput:heavy_check_mark:The output from the generation