Skip to main content
POST
/
generations
curl -X POST https://app.mavera.io/api/v1/generations \
  -H "Authorization: Bearer mvra_live_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "app_id": "blog-post-generator",
    "input_data": {
      "topic": "AI in Marketing",
      "tone": "professional",
      "length": "medium"
    },
    "brand_voice_id": "optional-brand-voice-id"
  }'
{
  "id": "<string>",
  "object": "generation",
  "title": "<string>",
  "app": {
    "id": "<string>",
    "name": "<string>",
    "category": "<string>"
  },
  "brand_voice": {
    "id": "<string>",
    "label": "<string>"
  },
  "input_data": {},
  "output": "<string>",
  "content": "<string>",
  "content_type": "markdown",
  "workspace_id": "<string>",
  "usage": {
    "prompt_tokens": 123,
    "completion_tokens": 123,
    "total_tokens": 123,
    "credits_used": 123
  },
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

API key prefixed with mvra_live_. Create keys at Settings > Developer > API Keys.

Body

application/json
app_id
string
required

ID of the generation app to use

input_data
object
required

Input values matching the app's input_fields. Keys should match field names.

brand_voice_id
string

Optional brand voice ID to apply styling

persona_id
string

Optional persona ID for audience targeting

workspace_id
string

Target workspace (uses default if not specified)

title
string

Custom title (auto-generated if not provided)

stream
boolean
default:false

If true, returns a streaming response using Server-Sent Events (SSE)

Response

Content generated successfully

id
string
object
enum<string>
Available options:
generation
title
string
app
object

Reference to a generation app

brand_voice
object

Reference to a brand voice

input_data
object
output
string
content
string

The generated content (same as output)

content_type
enum<string>
Available options:
markdown,
html
workspace_id
string
usage
object
created_at
string<date-time>
updated_at
string<date-time>