OyeFilmy Logo
personFreeUpgrade
bolt0cr
U

Get started

Quickstart

Get your first AI generation running in under 5 minutes.

Prerequisites: You need an OyeFilmy account with credits. Free trial includes 100 credits.

Step 1: Create your API key

1

Go to API Keys

Navigate to Developer Dashboard → API Keys or the API & Webhooks page in your main sidebar.

2

Create a new key

Click "Create key", give it a name (e.g. "My App"), select scopes (at minimum generate:image), and copy the secret immediately — it's shown only once.

3

Store it securely

Save the key in your environment variables as OYEFILMY_API_KEY. Never commit it to version control.

# .env
OYEFILMY_API_KEY=of_live_9f3c8a21d4b60e7f15a2c8d93b41e607af52c1d8b3e94a60

Step 2: Generate an image

Send a POST request to /api/generate with your model and prompt:

curl -X POST https://api.oyefilmy.com/api/generate \
  -H "Authorization: Bearer of_live_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "modelKey": "gpt",
    "prompt": "A cinematic wide shot of a vintage red scooter on a rainy Mumbai street at dusk, 8K, volumetric lighting",
    "aspectRatio": "16:9"
  }'

Response:

{
  "success": true,
  "predictionId": "pred_7f3a9c2b...",
  "status": "processing",
  "model": "openai/gpt-image-2/text-to-image",
  "creditCost": 5,
  "estimatedTime": "~15s"
}

Step 3: Poll for results

The generation runs asynchronously. Poll GET /api/generate/status/:predictionId every 3 seconds until the status is completed or failed:

curl -X GET "https://api.oyefilmy.com/api/generate/status/pred_7f3a9c2b..." \
  -H "Authorization: Bearer of_live_YOUR_API_KEY"

Success response:

{
  "status": "completed",
  "outputUrl": "https://oyefilmy-assets.s3.amazonaws.com/.../output.png",
  "outputType": "image",
  "completedAt": "2026-07-27T14:00:00.000Z"
}

Pro tip: poll every 3 seconds for images and every 5 for video, and stop on completed or failed. See the polling guide →

What's next?