Generations
Get stored prompt, completion, and error content for a generation
Changed onget/generation/content
Request
- Base URL: https://openrouter.ai/api/v1
- URL: https://openrouter.ai/api/v1/generation/content
- Auth: HTTP bearer
Query parameters
idstring required
The generation ID
Example:gen-1234567890
Response
Returns the stored prompt and completion content, plus the failure error when the generation failed
Example response
{
"data": {
"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
}
}
}Changes
- breaking
added the pattern
^gen-[0-9A-Za-z-]+$to thequeryrequest parameterid - warning
for the
queryrequest parameterid, the maxLength was set to128 - info
for the
queryrequest parameterid, the minLength was decreased from1to0 - info
added the non-success response with the status
- breaking
- info
added the required property
/to the response with the status
- info