Skip to main content

Overview

AI GIF Generator creates animated GIFs using AI technology. Generate looping animations from static images or create entirely new animated content from text descriptions.

How It Works

  1. Provide input - Upload an image or provide a text prompt
  2. Set animation style - Choose animation type and duration
  3. AI generates - AI creates smooth, looping animated GIF
  4. Download GIF - Retrieve your animated GIF file

Use Cases

  • Social media content - Create eye-catching animated posts
  • Reactions and memes - Generate custom reaction GIFs
  • Marketing materials - Animated graphics for campaigns
  • Website elements - Dynamic visual content
  • Messaging - Custom animated stickers and GIFs

Code Examples

Generate GIF from Image

from magic_hour import Client
from os import getenv

client = Client(token=getenv("API_TOKEN"))
result = client.v1.ai_gif_generator.generate(
    style={"prompt": "Cat fighting a lion, pixel art"},
    name="Ai Gif gif",
    output_format="gif",
    wait_for_completion=True,
    download_outputs=True,
    download_directory="outputs"
)

if result.status == "complete":
    print(f"✅ GIF complete!")
    print(f"Downloaded to: {result.downloaded_paths}")
    print(f"Credits charged: {result.credits_charged}")
else:
    print(f"❌ Job failed with status: {result.status}")
    if hasattr(result, 'error_message'):
        print(f"Error: {result.error_message}")

Pricing

OutputCredits
1 animated GIF15 credits
Try this in our Google Colab Cookbook: Run this API with sample code. Just add your API key.

API Reference

AI GIF Generator API Reference

View full API specification