Generations
Generate content
Generate AI content using a template. Uses credits. Supports both standard and streaming responses via the stream parameter.
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"
}{
"error": {
"message": "Invalid API key.",
"type": "authentication_error",
"code": "invalid_api_key",
"param": null
}
}{
"error": {
"message": "Invalid API key.",
"type": "authentication_error",
"code": "invalid_api_key",
"param": null
}
}{
"error": {
"message": "Invalid API key.",
"type": "authentication_error",
"code": "invalid_api_key",
"param": null
}
}{
"error": {
"message": "Invalid API key.",
"type": "authentication_error",
"code": "invalid_api_key",
"param": null
}
}{
"error": {
"message": "Invalid API key.",
"type": "authentication_error",
"code": "invalid_api_key",
"param": null
}
}Authorizations
Body
application/json
Response
Content generated successfully
⌘I
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"
}{
"error": {
"message": "Invalid API key.",
"type": "authentication_error",
"code": "invalid_api_key",
"param": null
}
}{
"error": {
"message": "Invalid API key.",
"type": "authentication_error",
"code": "invalid_api_key",
"param": null
}
}{
"error": {
"message": "Invalid API key.",
"type": "authentication_error",
"code": "invalid_api_key",
"param": null
}
}{
"error": {
"message": "Invalid API key.",
"type": "authentication_error",
"code": "invalid_api_key",
"param": null
}
}{
"error": {
"message": "Invalid API key.",
"type": "authentication_error",
"code": "invalid_api_key",
"param": null
}
}