Authentication
All API requests require an API key to be passed via the x-api-key header. You can generate
your API Key from the AI MetaGen Pro top navigation bar inside the tool.
Note: API access is strictly available for users on the Pro or
Premium plans. Free users must upgrade to generate programmatic metadata.
API Endpoint Overview
POST https://metagen-pro-api.metagenp.workers.dev/api/v1/generate
Use this endpoint to generate titles, descriptions, and keywords for a given prompt or image.
Request Headers
| Header | Type | Description |
|---|---|---|
Content-Type |
application/json |
Must be strictly set to application/json. |
x-api-key |
string |
Your AI MetaGen Pro authentication core key. |
Request Body Payload
| Parameter | Type | Required | Description |
|---|---|---|---|
action |
string |
Yes | Typically set to metadata for generating titles, keywords, and descriptions. |
provider |
string |
No | Model to use. Acceptable values: groq (default) or gemini. |
prompt |
string |
Yes (if no image) | The text prompt explaining the image or subject. |
image |
string |
Yes (if no prompt) | Base64 encoded string of the image. Wait to omit if using a pure text prompt. |
mimeType |
string |
Conditional | E.g image/jpeg or image/png. Required if image is passed. |
Example Usage
Below is a standardized cURL request demonstrating how to communicate with the endpoint.
curl -X POST https://metagen-pro-api.metagenp.workers.dev/api/v1/generate \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY_HERE" \
-d '{
"action": "metadata",
"provider": "groq",
"prompt": "A beautiful sunset over the mountains of switzerland."
}'
Responses
The AI MetaGen Pro API standardizes its responses as proper JSON payload objects format.
Success Response (200 OK)
{
"title": "Stunning Sunset Over Swiss Mountains Landscape",
"description": "Breathtaking view of a vibrant sunset over the majestic mountain peaks of Switzerland...",
"keywords": "sunset, switzerland, mountains, landscape, vibrant, peaks, nature, alpine"
}
Error Response (401 / 403 / 429)
{
"error": "Invalid API Key."
}
Note: If you exhaust your limits, a 429 will be returned specifying that the request limit was reached.
API Pricing Plans
Choose the plan that best fits your workflow and metadata generation requirements. API rates scale based on your active plan tier.
Free Plan
$0/month
- Standard Web App access
- Single manual generation
- API Access Key
- Programmatic automation
Popular
Pro Plan
$15/month
- Unlimited Web App access
- 5,000 API requests / month
- API access key included
- Groq Engine support
Premium Plan
$49/month
- Unlimited Web App access
- 25,000 API requests / month
- API access key included
- Groq & Gemini Engines