Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.gmicloud.ai/llms.txt

Use this file to discover all available pages before exploring further.

Model ID
Luma-Ray2

Luma-Ray2 API Usage Guide

Overview

Luma-Ray2 is Luma’s flagship video generation model, offering state-of-the-art AI video creation capabilities. With support for text-to-video, image-to-video, video extension, and advanced features like camera motions and concepts, Ray 2 empowers creators to bring their visions to life with stunning visual quality.

Key Features:

  • Multiple Generation Modes: Text-to-video, image-to-video, video extension, and interpolation
  • High Quality Output: Support for resolutions up to 4K with crisp, detailed videos
  • Flexible Duration: Generate videos of 5 or 9 seconds
  • Multiple Aspect Ratios: Support for various formats including 16:9, 9:16, 1:1, and more
  • Advanced Features: Camera motions, concepts, loop generation, and keyframe control
  • Professional Quality: Suitable for commercial and creative applications

Authentication

All API requests require authentication using an API key. Include your API key in the Authorization header:
Authorization: Bearer YOUR_API_KEY

Submit Video Generation Request

Endpoint

POST /api/v1/ie/requestqueue/apikey/requests

Request Format

curl --location 'https://console.gmicloud.ai/api/v1/ie/requestqueue/apikey/requests' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--data '{
    "model": "Luma-Ray2",
    "payload": {
        "prompt": "A majestic dragon soaring through a mystical forest at sunset",
        "durationSeconds": 9,
        "aspectRatio": "16:9",
        "resolution": "1080p",
        "loop": false,
        "negative_prompt": "",
        "seed": null
    }
}'

Request Parameters

ParameterTypeRequiredDescriptionDefaultConstraints
promptstringYesText prompt describing the desired video-Required
resolutionstringNoVideo resolution quality”720p”Options: “540p”, “720p”, “1080p”, “4k”
durationstringNoVideo length”5s”Options: “5s”, “9s”
aspect_ratiostringNoVideo aspect ratio”16:9”Options: “16:9”, “9:16”, “1:1”, “4:3”, “3:4”, “21:9”, “9:21”
loopbooleanNoWhether video should loop seamlesslyfalsetrue/false
frame0_imagestringNoStart frame image URL for image-to-video""Publicly accessible image URL
frame1_imagestringNoEnd frame image URL for image-to-video""Publicly accessible image URL

Response

{
  "request_id": "550e8400-e29b-41d4-a716-446655440000",
  "model": "Luma-Ray2",
  "status": "queued",
  "created_at": 1750442925,
  "updated_at": 1750442925,
  "queued_at": 1750442925
}

Check Request Status

Endpoint

GET /api/v1/ie/requestqueue/apikey/requests/{request_id}

Example

curl --location 'https://console.gmicloud.ai/api/v1/ie/requestqueue/apikey/requests/550e8400-e29b-41d4-a716-446655440000' \
--header 'Authorization: Bearer YOUR_API_KEY'

Response

{
  "request_id": "550e8400-e29b-41d4-a716-446655440000",
  "org_id": "your-org-id",
  "model": "Luma-Ray2",
  "status": "success",
  "is_public": false,
  "payload": {
    "prompt": "A majestic dragon soaring through a mystical forest at sunset",
    "resolution": "1080p",
    "duration": "9s",
    "aspect_ratio": "16:9",
    "loop": false
  },
  "outcome": {
    "video_url": "https://storage.googleapis.com/bucket/generated-video.mp4",
    "thumbnail_image_url": "https://storage.googleapis.com/bucket/thumbnail.jpg"
  },
  "created_at": 1750442925,
  "updated_at": 1750442930,
  "queued_at": 1750442925
}

Request Status Values

StatusDescription
queuedRequest is waiting to be processed
processingVideo generation is in progress
successVideo generation completed successfully
failedVideo generation failed
cancelledRequest was cancelled

List Your Requests

Endpoint

GET /api/v1/ie/requestqueue/apikey/requests?model_id=Luma-Ray2

Example

curl --location 'https://console.gmicloud.ai/api/v1/ie/requestqueue/apikey/requests?model_id=Luma-Ray2' \
--header 'Authorization: Bearer YOUR_API_KEY'

Get Model Information

Endpoint

GET /api/v1/ie/requestqueue/apikey/models/Luma-Ray2

Example

curl --location 'https://console.gmicloud.ai/api/v1/ie/requestqueue/apikey/models/Luma-Ray2' \
--header 'Authorization: Bearer YOUR_API_KEY'

List Available Models

Endpoint

GET /api/v1/ie/requestqueue/apikey/models

Example

curl --location 'https://console.gmicloud.ai/api/v1/ie/requestqueue/apikey/models' \
--header 'Authorization: Bearer YOUR_API_KEY'

Response

{
  "model_ids": [
    "Luma-Ray2",
    "other-model-1",
    "other-model-2"
  ]
}

Video Specifications

  • Duration: 5, 9 seconds
  • Resolutions:
    • 540p (economical)
    • 720p (recommended)
    • 1080p (high quality)
    • 4K (ultra high quality)
  • Aspect Ratios:
    • Landscape: 16:9, 21:9
    • Portrait: 9:16, 3:4, 9:21
    • Square: 1:1
    • Standard: 4:3

Tips for Better Results

  1. Clear, Descriptive Prompts: Use specific, detailed descriptions for better video quality
  2. Resolution Selection:
    • Use 720p for most use cases (best balance of quality and speed)
    • Use 1080p for professional content
    • Use 4K for premium projects (longer generation time)
  3. Aspect Ratio Selection:
    • Use 16:9 for landscape content, YouTube, and widescreen displays
    • Use 9:16 for mobile-first content, TikTok, and Instagram Stories
    • Use 1:1 for social media posts and square formats
    • Use 21:9 for cinematic content and ultrawide displays
  4. Duration Considerations:
    • 5 seconds: Quick content, social media
    • 9 seconds: More complex scenes, detailed storytelling
  5. Loop Generation: Enable for continuous animations, backgrounds, or seamless loops