> ## 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.

# GenerationContentData

Stored prompt and completion content, plus the failure error when one was stored

## Example Usage

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

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

## Fields

| Field    | Type                                                                            | Required             | Description                                                                  | Example                                                                                                                                                                                                                                                                                                                                                                                                          |
| -------- | ------------------------------------------------------------------------------- | -------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `error`  | [models.GenerationContentError](../models/generationcontenterror.mdx)           | :heavy\_check\_mark: | The stored failure for this generation, or null when it succeeded            | \{<br />"message": "Timed out waiting for the provider",<br />"previous\_errors": \[<br />\{<br />"code": 429,<br />"message": "Provider returned error",<br />"provider\_name": "Google",<br />"raw": "\{"error":\{"code":429,"message":"Resource exhausted"}}"<br />}<br />],<br />"provider\_name": "Vertex",<br />"raw": "\{"error":\{"code":504,"message":"Deadline exceeded"}}",<br />"status": 504<br />} |
| `input`  | *models.InputUnion*                                                             | :heavy\_check\_mark: | The input to the generation — either a prompt string or an array of messages |                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `output` | [models.GenerationContentDataOutput](../models/generationcontentdataoutput.mdx) | :heavy\_check\_mark: | The output from the generation                                               |                                                                                                                                                                                                                                                                                                                                                                                                                  |
