@@ -447,22 +447,29 @@ print(f"\n🎉 Generated {len(videos)} videos successfully!")
447447🎉 Generated 3 videos successfully!
448448```
449449
450- ### Example 3: Advanced Video Generation
450+ ### Example 3: Advanced Video Generation with Orientation
451451
452452``` python
453453from metaai_api import MetaAI
454454
455455ai = MetaAI(cookies = cookies)
456456
457- # Fine-tune generation parameters
457+ # Generate video with specific orientation (default is VERTICAL)
458458result = ai.generate_video(
459459 prompt = " A time-lapse of a flower blooming" ,
460+ orientation = " VERTICAL" , # Options: "LANDSCAPE", "VERTICAL", "SQUARE"
460461 wait_before_poll = 15 , # Wait 15 seconds before checking
461462 max_attempts = 50 , # Try up to 50 times
462463 wait_seconds = 3 , # Wait 3 seconds between attempts
463464 verbose = True # Show detailed progress
464465)
465466
467+ # Generate landscape video for widescreen
468+ result_landscape = ai.generate_video(
469+ prompt = " Panoramic view of sunset over mountains" ,
470+ orientation = " LANDSCAPE" # Wide format (16:9)
471+ )
472+
466473if result[" success" ]:
467474 print (f " \n 🎬 Your videos are ready! " )
468475 print (f " 🔗 Generated { len (result[' video_urls' ])} videos: " )
@@ -471,6 +478,14 @@ if result["success"]:
471478 print (f " ⏱️ Generated at: { result[' timestamp' ]} " )
472479```
473480
481+ ** Supported Video Orientations:**
482+
483+ - ` "LANDSCAPE" ` - Wide/horizontal (16:9) - ideal for widescreen, cinematic content
484+ - ` "VERTICAL" ` - Tall/vertical (9:16) - ideal for mobile, stories, reels (default)
485+ - ` "SQUARE" ` - Equal dimensions (1:1) - ideal for social posts
486+
487+ ````
488+
474489📖 **Full Video Guide:** See [VIDEO_GENERATION_README.md](https://github.com/mir-ashiq/metaai-api/blob/main/VIDEO_GENERATION_README.md) for complete documentation!
475490
476491---
@@ -525,7 +540,7 @@ if result["success"]:
525540 )
526541 if video["success"]:
527542 print(f"🎬 Video: {video['video_urls'][0]}")
528- ```
543+ ````
529544
530545** Output:**
531546
@@ -543,24 +558,46 @@ if result["success"]:
543558
544559## 🎨 Image Generation
545560
546- Generate AI-powered images (requires Facebook authentication):
561+ Generate AI-powered images with customizable orientations (requires Facebook authentication):
547562
548563``` python
549564from metaai_api import MetaAI
550565
551566# Initialize with Facebook credentials
552567ai = MetaAI(fb_email = " your_email@example.com" , fb_password = " your_password" )
553568
554- # Generate images
569+ # Generate images with default orientation (VERTICAL)
555570response = ai.prompt(" Generate an image of a cyberpunk cityscape at night with neon lights" )
556571
572+ # Or specify orientation explicitly
573+ response_landscape = ai.prompt(
574+ " Generate an image of a panoramic mountain landscape" ,
575+ orientation = " LANDSCAPE" # Options: "LANDSCAPE", "VERTICAL", "SQUARE"
576+ )
577+
578+ response_vertical = ai.prompt(
579+ " Generate an image of a tall waterfall" ,
580+ orientation = " VERTICAL" # Tall/portrait format (default)
581+ )
582+
583+ response_square = ai.prompt(
584+ " Generate an image of a centered mandala pattern" ,
585+ orientation = " SQUARE" # Square format (1:1)
586+ )
587+
557588# Display results (Meta AI generates 4 images by default)
558589print (f " 🎨 Generated { len (response[' media' ])} images: " )
559590for i, image in enumerate (response[' media' ], 1 ):
560591 print (f " Image { i} : { image[' url' ]} " )
561592 print (f " Prompt: { image[' prompt' ]} " )
562593```
563594
595+ ** Supported Orientations:**
596+
597+ - ` "LANDSCAPE" ` - Wide/horizontal format (16:9) - ideal for panoramas, landscapes
598+ - ` "VERTICAL" ` - Tall/vertical format (9:16) - ideal for portraits, mobile content (default)
599+ - ` "SQUARE" ` - Equal dimensions (1:1) - ideal for social media, profile images
600+
564601** Output:**
565602
566603```
@@ -640,7 +677,6 @@ class MetaAI:
640677** Methods:**
641678
642679- ** ` prompt(message, stream=False, new_conversation=False) ` **
643-
644680 - Send a chat message
645681 - Returns: ` dict ` with ` message ` , ` sources ` , and ` media `
646682
0 commit comments