GIF89a · image/gifOpenAI & Google Gemini

Text-to-GIF & Image-to-GIF API

Generate a ready-to-use ~3s looping GIF from text or a reference photo in one API call — no MP4 transcoding with FFmpeg.

GIF Standard
7.87 ₽ / $0.095
GIF Pro
16.86 ₽ / $0.203
Trial pack
149 ₽ / $1.79

What the GIF API returns

Direct image/gif without FFmpeg

The Gemini Omni API outputs MP4. A palette-based GIF conversion uses two FFmpeg passes. BananaPic returns a looping GIF89a in one request.

OpenAI & Google Gemini compatible

Set output_format="gif" and add image_url for a reference photo URL, or call the Gemini-compatible method with outputMimeType="image/gif".

Async polling & 24h retention

On 504 job_pending, read X-Job-ID and poll GET /v1/jobs/{id}. Repeating the POST can start and charge for a second job. Results are available for 24 hours by default.

Generate and download a GIF

cURL · text to GIF

curl -sS -D gif-headers.txt 'https://bananapic.app/v1/images/generations' \
  -H "Authorization: Bearer $BANANAPIC_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{"model":"nano-banana-gif","prompt":"Steam curls above a coffee cup in a seamless loop","output_format":"gif","response_format":"url"}' \
  -o gif-response.json
# On HTTP 200, use the signed data[0].url to get the GIF bytes.
GIF_URL=$(python -c 'import json; print(json.load(open("gif-response.json"))["data"][0]["url"])')
curl --fail-with-body "$GIF_URL" -o coffee.gif

cURL · upload a photo

curl -sS -D gif-headers.txt 'https://bananapic.app/v1/images/edits' \
  -H "Authorization: Bearer $BANANAPIC_API_KEY" \
  -F model=nano-banana-gif-pro -F image=@perfume.jpg \
  -F 'prompt=Rotate the bottle slowly, then settle into the opening pose' \
  -F output_format=gif -F response_format=url -o gif-response.json

cURL · status and download

# If HTTP 504 job_pending, set JOB_ID from X-Job-ID.
# Repeat this GET while status is queued or running.
curl --fail-with-body "https://bananapic.app/v1/jobs/$JOB_ID" \
  -H "Authorization: Bearer $BANANAPIC_API_KEY"
# Once status is succeeded, download the original result.
curl --fail-with-body "https://bananapic.app/v1/jobs/$JOB_ID/result?output_format=gif" \
  -H "Authorization: Bearer $BANANAPIC_API_KEY" -o animation.gif

Python · image_url and job polling

import base64
import os
import time
from pathlib import Path

import requests

base = "https://bananapic.app"
with requests.Session() as client:
    client.headers["Authorization"] = "Bearer " + os.environ["BANANAPIC_API_KEY"]
    # Omit image_url for text-to-GIF. Use a publicly reachable HTTPS photo URL.
    reply = client.post(base + "/v1/images/generations", json={
        "model": "nano-banana-gif-pro",
        "prompt": "Rotate the bottle and bring it gently back to its first pose",
        "image_url": "https://example.com/perfume.jpg",
        "output_format": "gif",
        "response_format": "b64_json",
    }, timeout=360)
    if reply.status_code == 504 and reply.json()["error"]["code"] == "job_pending":
        job_url = base + "/v1/jobs/" + reply.headers["X-Job-ID"]
        for _ in range(120):
            time.sleep(3)
            status = client.get(job_url, timeout=20)
            status.raise_for_status()
            job = status.json()
            if job["status"] == "succeeded":
                result = client.get(job_url + "/result?output_format=gif", timeout=30)
                result.raise_for_status()
                gif = result.content
                break
            if job["status"] not in ("queued", "running"):
                raise RuntimeError(job.get("error") or job["status"])
        else:
            raise TimeoutError(job_url)
    else:
        reply.raise_for_status()
        gif = base64.b64decode(reply.json()["data"][0]["b64_json"])
    Path("animation.gif").write_bytes(gif)

Google Gemini · inlineData

PHOTO_B64=$(python -c 'import base64; print(base64.b64encode(open("perfume.jpg","rb").read()).decode())')
curl -sS -D gemini-headers.txt 'https://bananapic.app/v1beta/models/nano-banana-gif-pro:generateContent' \
  -H "x-goog-api-key: $BANANAPIC_API_KEY" -H 'Content-Type: application/json' \
  -d @- -o gemini-response.json <<JSON
{"contents":[{"parts":[{"text":"Rotate the bottle in a seamless loop"},{"inlineData":{"mimeType":"image/jpeg","data":"$PHOTO_B64"}}]}],"generationConfig":{"imageConfig":{"outputMimeType":"image/gif"}}}
JSON
# On HTTP 200, decode the image/gif inlineData payload.
python -c 'import base64,json; p=json.load(open("gemini-response.json"))["candidates"][0]["content"]["parts"][0]["inlineData"]; assert p["mimeType"]=="image/gif"; open("perfume.gif","wb").write(base64.b64decode(p["data"]))'

GIF generation costs

Model and API IDCreditsPer render on ScalePer 1,000 renders
Nano Banana GIF Standard
nano-banana-gif
77.87 ₽ / $0.0957,866.25 ₽ / $94.84
Nano Banana GIF Pro
nano-banana-gif-pro
1516.86 ₽ / $0.20316,856.25 ₽ / $203.23

Trial covers 7 Standard GIFs or 3 Pro GIFs plus 5 2K photos.

An eligible first-order promo code adds +15% credits.

Credits have no monthly expiry. The remaining balance expires after 12 months without generations or top-ups. Failed and preview-only jobs cost zero credits.

Payment methods: SBP, crypto (Crypto Bot). Checkout shows the total with any fees.

Per-call USDC payments via x402 are on the roadmap.

GIF Standard and Pro with the same inputs

Nano Banana GIF Standard

nano-banana-gif7 credits7.87 ₽ / $0.095

Create clean loops with one distinct motion such as a rotating bottle, steaming coffee or a highlight across packaging.

Nano Banana GIF Pro

nano-banana-gif-pro15 credits16.86 ₽ / $0.203

Choose Pro for multi-stage motion or when the animation needs to follow a detailed sequence.

Video with audio

Nano Banana Video API