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

Example Usage

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

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

Fields

FieldTypeRequiredDescriptionExample
datamodels.GenerationContentData:heavy_check_mark:Stored prompt and completion content{"input": {"messages": [{"content": "What is the meaning of life?","role": "user"}
]
},
“output”: {"completion": "The meaning of life is a philosophical question...","reasoning": null}
}