Skip to main content
Promira AI API Documentation

Comprehensive API documentation for integrating Promira AI's image, video, and script generation capabilities into your applications.

Quick Start

Authentication

All API requests require authentication via API key in the Authorization header.

bash
curl -X POST https://promira.ai/api/generate-gemini-image-simple \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"prompt": "A beautiful sunset over mountains"}'

Base URL

All API endpoints are available at:

text
https://promira.ai/api/

Image Generation APIs

Gemini 2.5 Flash Image Generation

Generate high-quality images using Google's Gemini 2.5 Flash model with streaming support.

Request

json
POST /api/generate-gemini-image-simple
Content-Type: application/json

{
  "prompt": "A futuristic cityscape at sunset",
  "model": "gemini-2.5-flash-image",
  "aspectRatio": "16:9"
}

Response

json
{
  "status": "success",
  "images": [
    {
      "url": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...",
      "metadata": {
        "model": "gemini-2.5-flash-image",
        "prompt": "A futuristic cityscape at sunset",
        "aspectRatio": "16:9"
      }
    }
  ]
}

Video Generation APIs

Sora 2 Pro Video Generation

Generate high-quality videos using OpenAI's Sora 2 Pro model (Preview Mode).

Request

json
POST /api/generate-sora2-pro
Content-Type: application/json

{
  "prompt": "A cat playing with a ball of yarn",
  "duration": 10,
  "quality": "hd"
}

Response

json
{
  "status": "queued",
  "jobId": "job_123456789",
  "message": "Video generation queued. This is preview mode.",
  "estimatedTime": "2-5 minutes"
}

Script Generation APIs

GPT-4 Script Generation

Generate scripts for videos, presentations, and content using OpenAI's GPT-4.

Request

json
POST /api/generate-script
Content-Type: application/json

{
  "prompt": "Create a script for a product launch video",
  "type": "video",
  "length": "2 minutes",
  "tone": "professional"
}

Response

json
{
  "status": "success",
  "script": {
    "title": "Product Launch Video Script",
    "content": "Scene 1: Opening...",
    "duration": "2:15",
    "wordCount": 350
  }
}

Rate Limits & Quotas

Free Tier

  • • 10 images per day
  • • 5 videos per day
  • • 20 scripts per day
  • • Basic support

Pro Tier

  • • 100 images per day
  • • 50 videos per day
  • • 200 scripts per day
  • • Priority support

Enterprise

  • • Unlimited generation
  • • Custom models
  • • Dedicated support
  • • SLA guarantees

Error Codes

400 - Bad Request

Invalid request parameters or missing required fields.

401 - Unauthorized

Invalid or missing API key.

429 - Rate Limited

API rate limit exceeded. Please wait before retrying.

500 - Server Error

Internal server error. Please try again later.

Security & Best Practices

API Key Security

  • • Store API keys securely in environment variables
  • • Never expose API keys in client-side code
  • • Rotate API keys regularly
  • • Use HTTPS for all API requests

Content Policy

  • • Generated content must comply with our terms of service
  • • No generation of harmful, illegal, or inappropriate content
  • • Respect copyright and intellectual property rights
  • • Generated content may include watermarks for authenticity

Need Help?

Our support team is here to help you integrate Promira AI into your applications.