News
Chat about a story
Have a conversation with AI about a news story. Ask questions, get analysis, and understand the story better. Uses credits.
POST
/
news
/
stories
/
{id}
/
chat
curl -X POST "https://app.mavera.io/api/v1/news/stories/STORY_ID/chat" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"message": "What are the key implications of this story?"}'{
"object": "news_story_chat",
"story_id": "<string>",
"story_name": "<string>",
"message": {
"role": "assistant",
"content": "<string>"
},
"usage": {
"prompt_tokens": 123,
"completion_tokens": 123,
"credits_used": 123
},
"created_at": "2023-11-07T05:31:56Z"
}{
"error": {
"message": "Invalid API key.",
"type": "authentication_error",
"code": "invalid_api_key",
"param": null
}
}{
"error": {
"message": "Insufficient credits. Please upgrade your subscription.",
"type": "insufficient_credits",
"code": "credits_exhausted",
"param": null
}
}{
"error": {
"message": "The requested resource was not found.",
"type": "not_found",
"code": "resource_not_found",
"param": null
}
}{
"error": {
"message": "Rate limit exceeded. Please retry after 30 seconds.",
"type": "rate_limit_error",
"code": "rate_limit_exceeded",
"param": null
}
}Authorizations
API key prefixed with mvra_live_. Create keys at Settings > Developer > API Keys.
Path Parameters
Story ID
Body
application/json
⌘I
curl -X POST "https://app.mavera.io/api/v1/news/stories/STORY_ID/chat" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"message": "What are the key implications of this story?"}'{
"object": "news_story_chat",
"story_id": "<string>",
"story_name": "<string>",
"message": {
"role": "assistant",
"content": "<string>"
},
"usage": {
"prompt_tokens": 123,
"completion_tokens": 123,
"credits_used": 123
},
"created_at": "2023-11-07T05:31:56Z"
}{
"error": {
"message": "Invalid API key.",
"type": "authentication_error",
"code": "invalid_api_key",
"param": null
}
}{
"error": {
"message": "Insufficient credits. Please upgrade your subscription.",
"type": "insufficient_credits",
"code": "credits_exhausted",
"param": null
}
}{
"error": {
"message": "The requested resource was not found.",
"type": "not_found",
"code": "resource_not_found",
"param": null
}
}{
"error": {
"message": "Rate limit exceeded. Please retry after 30 seconds.",
"type": "rate_limit_error",
"code": "rate_limit_exceeded",
"param": null
}
}