Skip to main content
GET
/
generation
/
content
Get stored prompt and completion content for a generation
curl --request GET \
  --url https://openrouter.ai/api/v1/generation/content \
  --header 'Authorization: Bearer <token>'
{
  "data": {
    "input": {
      "messages": [
        {
          "content": "What is the meaning of life?",
          "role": "user"
        }
      ]
    },
    "output": {
      "completion": "The meaning of life is a philosophical question...",
      "reasoning": null
    }
  }
}

Authorizations

Authorization
string
header
required

API key as bearer token in Authorization header

Query Parameters

id
string
required

The generation ID

Minimum string length: 1
Example:

"gen-1234567890"

Response

Returns the stored prompt and completion content

Stored prompt and completion content for a generation

data
object
required

Stored prompt and completion content

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