[{"data":1,"prerenderedAt":456,"buildId":457},["ShallowReactive",2],{"blog:article:discord-bot-ai-image-generation":3,"catalog":123},{"article":4,"related":93,"studioPath":122},{"slug":5,"path":6,"title":7,"description":8,"category":9,"categoryLabel":10,"date":11,"updated":11,"readingMinutes":12,"models":13,"featured":17,"primaryKeyword":18,"keywords":19,"words":28,"toc":29,"blocks":49,"faq":87},"discord-bot-ai-image-generation","\u002Fblog\u002Fdiscord-bot-ai-image-generation","Discord Bot Image Generation: Images and Clips by API","Discord bot image generation with slash commands: the bot, the API call, posting images and clips, budgets per server and a key kept off Discord.","guides","Guides","2026-11-28",6,[14,15,16],"nano-banana-2-1","fp-image-1","grok-imagine",false,"discord bot image generation",[18,20,21,22,23,24,25,26,27],"discord ai image generator bot","discord bot image commands","discord bot image editor","how to make a discord generator bot","discord image generation bot python","discord video generation bot","midjourney discord","unrestricted ai discord bot",1415,[30,34,37,40,43,46],{"id":31,"text":32,"level":33},"discord-bot-image-generation-in-brief","Discord bot image generation in brief",2,{"id":35,"text":36,"level":33},"set-up-the-bot-and-the-key","Set up the bot and the key",{"id":38,"text":39,"level":33},"from-slash-command-to-api-request","From slash command to API request",{"id":41,"text":42,"level":33},"posting-the-result-back-to-discord","Posting the result back to Discord",{"id":44,"text":45,"level":33},"budgets-and-abuse","Budgets and abuse",{"id":47,"text":48,"level":33},"faq","FAQ",[50,53,57,59,63,65],{"type":51,"html":52},"html","\u003Cp>Discord bot image generation takes three steps: the slash command defers its reply, your bot sends the prompt to an image API and waits for the job, then it posts the file in the channel. With Frameport, one key on the bot&#39;s server reaches every model in the catalog, so the same bot can draw with \u003Ca href=\"\u002Fmodels\u002Fnano-banana-2-1\">Nano Banana 2.1\u003C\u002Fa> at $0.085 an image, edit an attached picture with Frameport Image 1, and make short clips with Grok Imagine.\u003C\u002Fp>\n\u003Cp>This guide builds that bot in Python with discord.py: three commands, the request behind each one, how the result gets back to Discord, and the budgets that stop one server from spending your whole balance.\u003C\u002Fp>\n\u003Ch2 id=\"discord-bot-image-generation-in-brief\">Discord bot image generation in brief\u003C\u002Fh2>\n\u003Cp>Discord gives a bot three seconds to answer a slash command, and an image or a clip takes longer than that. So each command defers first, which shows &quot;thinking&quot; in the channel, then does the work. Discord&#39;s documentation says the interaction token then stays valid for 15 minutes for follow-up messages, which covers most images; the code below falls back to a plain channel message for a clip that takes longer.\u003C\u002Fp>\n\u003Cdiv class=\"blog-table box blog-table-wide\">\u003Ctable class=\"tbl\">\u003Cthead>\u003Ctr>\u003Cth scope=\"col\">Command\u003C\u002Fth>\u003Cth scope=\"col\">Model\u003C\u002Fth>\u003Cth scope=\"col\">What it sends\u003C\u002Fth>\u003Cth scope=\"col\" class=\"r\">Price\u003C\u002Fth>\u003C\u002Ftr>\u003C\u002Fthead>\u003Ctbody>\u003Ctr>\u003Ctd>\u003Ccode>\u002Fimagine prompt\u003C\u002Fcode>\u003C\u002Ftd>\u003Ctd>Nano Banana 2.1\u003C\u002Ftd>\u003Ctd>The prompt only\u003C\u002Ftd>\u003Ctd class=\"r\">$0.085 an image\u003C\u002Ftd>\u003C\u002Ftr>\n\u003Ctr>\u003Ctd>\u003Ccode>\u002Fedit picture instruction\u003C\u002Fcode>\u003C\u002Ftd>\u003Ctd>Frameport Image 1\u003C\u002Ftd>\u003Ctd>The attached picture as a reference, and the instruction\u003C\u002Ftd>\u003Ctd class=\"r\">$0.025 an image\u003C\u002Ftd>\u003C\u002Ftr>\n\u003Ctr>\u003Ctd>\u003Ccode>\u002Fclip prompt\u003C\u002Fcode>\u003C\u002Ftd>\u003Ctd>Grok Imagine\u003C\u002Ftd>\u003Ctd>The prompt, 5 seconds at 480p\u003C\u002Ftd>\u003Ctd class=\"r\">$0.465 a clip\u003C\u002Ftd>\u003C\u002Ftr>\u003C\u002Ftbody>\u003C\u002Ftable>\u003C\u002Fdiv>\n\u003Cp>Nano Banana 2.1 reads no pictures, so it fits a pure text command. Frameport Image 1 takes up to 10 reference pictures and edits by instruction, which is what an image editor command needs. For clips with sound, swap in \u003Ca href=\"\u002Fmodels\u002Ffp-motion-1\">Frameport Motion 1\u003C\u002Fa>, from $0.10 for 5 seconds at 480p.\u003C\u002Fp>\n\u003Ch2 id=\"set-up-the-bot-and-the-key\">Set up the bot and the key\u003C\u002Fh2>\n\u003Col>\n\u003Cli>In the Discord developer portal, create an application, add a bot and copy its token. Invite it with the \u003Ccode>bot\u003C\u002Fcode> and \u003Ccode>applications.commands\u003C\u002Fcode> scopes, and the permissions to send messages and attach files.\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"\u002Fsignup\">Create a Frameport account\u003C\u002Fa>, add funds, and create an API key for this bot alone. It starts with \u003Ccode>fp_live_\u003C\u002Fcode>.\u003C\u002Fli>\n\u003Cli>Put both secrets in the environment of the machine that runs the bot, never in the code, a repository or a Discord message.\u003C\u002Fli>\n\u003C\u002Fol>",{"type":54,"lang":55,"code":56},"code","curl","export DISCORD_TOKEN=\"...\"\nexport FRAMEPORT_API_KEY=\"fp_live_...\"\npip install discord.py",{"type":51,"html":58},"\u003Cp>The key spends your balance, so it lives only where the bot runs. Users never see it: they send a command, your server makes the call. A key of its own also means the bot&#39;s spend shows under its name in the dashboard, and you can revoke it without touching your other apps (\u003Ca href=\"\u002Fdocs\u002Fauthentication#server\">authentication\u003C\u002Fa>).\u003C\u002Fp>\n\u003Ch2 id=\"from-slash-command-to-api-request\">From slash command to API request\u003C\u002Fh2>\n\u003Cp>The whole bot fits in one file. Each command builds a request body, \u003Ccode>generate()\u003C\u002Fcode> quotes it, checks the server&#39;s budget, submits it and waits, and \u003Ccode>post_result()\u003C\u002Fcode> hands the file to Discord:\u003C\u002Fp>",{"type":54,"lang":60,"code":61,"title":62},"python","import asyncio\nimport datetime\nimport io\nimport mimetypes\nimport os\n\nimport aiohttp\nimport discord\nfrom discord import app_commands\n\nAPI = \"https:\u002F\u002Fframeport.ai\u002Fv1\"\nHEADERS = {\"Authorization\": f\"Bearer {os.environ['FRAMEPORT_API_KEY']}\"}\nDAILY_BUDGET = float(os.environ.get(\"SERVER_DAILY_BUDGET\", \"5\"))  # your dollars, per server per day\nRATIOS = {\"1:1\": 1, \"3:4\": 3 \u002F 4, \"4:3\": 4 \u002F 3, \"9:16\": 9 \u002F 16, \"16:9\": 16 \u002F 9}\n\nspent = {}  # (server id, UTC day) -> dollars charged; use a database in production\nsession = None\n\n\nclass Refused(Exception):\n    \"\"\"Refused or failed: nothing was charged.\"\"\"\n\n\nclass Bot(discord.Client):\n    def __init__(self):\n        super().__init__(intents=discord.Intents.default())\n        self.tree = app_commands.CommandTree(self)\n\n    async def setup_hook(self):\n        global session\n        session = aiohttp.ClientSession()\n        await self.tree.sync()  # global commands can take a while to show up\n\n\nbot = Bot()\n\n\nasync def api(method, path, body=None, key=None):\n    headers = {**HEADERS, \"Idempotency-Key\": key} if key else HEADERS\n    async with session.request(method, f\"{API}{path}\", headers=headers, json=body) as res:\n        return await res.json()\n\n\nasync def generate(interaction, path, body):\n    if interaction.guild_id is None:\n        raise Refused(\"use this command in a server\")\n    today = (interaction.guild_id, datetime.datetime.now(datetime.timezone.utc).date())\n    quote = await api(\"POST\", \"\u002Fgenerations\u002Fquote\", body)\n    if quote.get(\"error\"):\n        raise Refused(quote[\"error\"][\"message\"])\n    if spent.get(today, 0) + quote[\"price_usd\"] > DAILY_BUDGET:\n        raise Refused(\"this server has used its budget for today\")\n    # The interaction id makes a retried submit return the first job instead of a second one\n    gen = await api(\"POST\", path, {**body, \"max_cost_usd\": quote[\"price_usd\"]}, key=f\"discord-{interaction.id}\")\n    if gen.get(\"error\"):\n        raise Refused(gen[\"error\"][\"message\"])\n    while gen[\"status\"] in (\"queued\", \"running\"):\n        await asyncio.sleep(3)\n        gen = await api(\"GET\", f\"\u002Fgenerations\u002F{gen['id']}\")\n    if gen[\"status\"] == \"failed\":\n        raise Refused(gen[\"error\"][\"message\"])\n    spent[today] = spent.get(today, 0) + gen[\"cost_usd\"]\n    return gen\n\n\nasync def reply(interaction, **message):\n    # The interaction token lasts 15 minutes; past that, post as the bot\n    if discord.utils.utcnow() - interaction.created_at \u003C datetime.timedelta(minutes=14):\n        await interaction.followup.send(**message)\n    else:\n        await interaction.channel.send(**message)\n\n\nasync def post_result(interaction, gen, caption):\n    output = gen[\"outputs\"][0]\n    async with session.get(output[\"url\"]) as res:  # a signed link: it opens without the key\n        data = await res.read()\n    name = \"result\" + (mimetypes.guess_extension(output[\"content_type\"]) or \"\")\n    try:\n        await reply(interaction, content=caption, file=discord.File(io.BytesIO(data), filename=name))\n    except discord.HTTPException as err:\n        if err.status != 413:\n            raise\n        # Over this server's upload limit: post the signed link, which opens for about an hour\n        await reply(interaction, content=f\"{caption}\\n{output['url']}\")\n\n\nasync def run(interaction, path, body, caption):\n    await interaction.response.defer(thinking=True)  # within Discord's three seconds\n    try:\n        gen = await generate(interaction, path, body)\n        await post_result(interaction, gen, caption)\n    except Refused as err:\n        await reply(interaction, content=f\"Nothing was made and nothing was charged: {err}\")\n\n\ndef per_user(interaction):\n    return (interaction.guild_id, interaction.user.id)\n\n\n@bot.tree.command(description=\"Generate an image from a prompt\")\n@app_commands.checks.cooldown(1, 30, key=per_user)\nasync def imagine(interaction: discord.Interaction, prompt: str):\n    body = {\"model\": \"nano-banana-2-1\", \"prompt\": prompt, \"aspect_ratio\": \"1:1\"}\n    await run(interaction, \"\u002Fimages\u002Fgenerations\", body, f\"{interaction.user.mention}: {prompt[:300]}\")\n\n\n@bot.tree.command(description=\"Edit a picture with an instruction\")\n@app_commands.checks.cooldown(1, 30, key=per_user)\nasync def edit(interaction: discord.Interaction, picture: discord.Attachment, instruction: str):\n    if not (picture.content_type or \"\").startswith(\"image\u002F\"):\n        await interaction.response.send_message(\"Attach a PNG, JPEG or WebP picture.\", ephemeral=True)\n        return\n    shape = picture.width \u002F picture.height if picture.width and picture.height else 1\n    body = {\n        \"model\": \"fp-image-1\",\n        \"prompt\": f\"Edit the picture: {instruction}. Keep everything else as it is.\",\n        \"reference_images\": [picture.url],\n        \"aspect_ratio\": min(RATIOS, key=lambda name: abs(RATIOS[name] - shape)),\n    }\n    await run(interaction, \"\u002Fimages\u002Fgenerations\", body, f\"{interaction.user.mention}: {instruction[:300]}\")\n\n\n@bot.tree.command(description=\"Make a short clip from a prompt\")\n@app_commands.checks.cooldown(1, 120, key=per_user)\nasync def clip(interaction: discord.Interaction, prompt: str):\n    body = {\"model\": \"grok-imagine\", \"prompt\": prompt, \"duration\": 5, \"resolution\": \"480p\", \"aspect_ratio\": \"16:9\"}\n    await run(interaction, \"\u002Fvideos\u002Fgenerations\", body, f\"{interaction.user.mention}: {prompt[:300]}\")\n\n\n@bot.tree.error\nasync def on_command_error(interaction: discord.Interaction, error: app_commands.AppCommandError):\n    if isinstance(error, app_commands.CommandOnCooldown):\n        await interaction.response.send_message(f\"Wait {error.retry_after:.0f} s for the next one.\", ephemeral=True)\n    else:\n        raise error\n\n\nbot.run(os.environ[\"DISCORD_TOKEN\"])","bot.py",{"type":51,"html":64},"\u003Cp>Three details carry the design:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\u003Cstrong>The quote comes first.\u003C\u002Fstrong> \u003Ccode>POST \u002Fv1\u002Fgenerations\u002Fquote\u003C\u002Fcode> takes the same body and answers with \u003Ccode>price_usd\u003C\u002Fcode> without holding or starting anything, so the bot can refuse a request the server&#39;s budget no longer covers before any money moves (\u003Ca href=\"\u002Fdocs\u002Fquotes\">quotes\u003C\u002Fa>).\u003C\u002Fli>\n\u003Cli>\u003Cstrong>\u003Ccode>max_cost_usd\u003C\u002Fcode> caps each request\u003C\u002Fstrong> at the quoted price. A request that would cost more is refused with \u003Ccode>400 max_cost_exceeded\u003C\u002Fcode>, also before anything is held.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>The \u003Ccode>Idempotency-Key\u003C\u002Fcode> is the interaction&#39;s id.\u003C\u002Fstrong> If your bot retries a submit after a network error, the API returns the first job rather than starting and charging a second one (\u003Ca href=\"\u002Fdocs\u002Fidempotency\">idempotency\u003C\u002Fa>).\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>The bot uses aiohttp, which discord.py installs, because a blocking HTTP call would freeze every other command while one job runs. A generation moves from \u003Ccode>queued\u003C\u002Fcode> to \u003Ccode>running\u003C\u002Fcode> to \u003Ccode>succeeded\u003C\u002Fcode> or \u003Ccode>failed\u003C\u002Fcode>, and reads are not counted against your limits. For the image endpoint&#39;s fields, see the \u003Ca href=\"\u002Fdocs\u002Fimages\">images reference\u003C\u002Fa>; for the same calls in a script, the \u003Ca href=\"\u002Fblog\u002Fimage-generation-api-python\">image generation API guide for Python\u003C\u002Fa>.\u003C\u002Fp>\n\u003Ch2 id=\"posting-the-result-back-to-discord\">Posting the result back to Discord\u003C\u002Fh2>\n\u003Cp>Each output carries a signed \u003Ccode>url\u003C\u002Fcode> that opens without a key for about an hour, and a \u003Ccode>content_type\u003C\u002Fcode>. The bot downloads the file and attaches it, so the image stays in the channel after that link expires.\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\u003Cstrong>Size limits.\u003C\u002Fstrong> Discord sets how large an attachment may be, and its interaction object carries an \u003Ccode>attachment_size_limit\u003C\u002Fcode> field in bytes. The code catches the \u003Ccode>413\u003C\u002Fcode> an oversized upload gets and posts the signed link instead. A clip at 480p is the easiest way to stay under the limit.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Your own copy.\u003C\u002Fstrong> Files are not kept forever on our side. A bot that keeps a gallery copies each file to its own storage and posts that link (\u003Ca href=\"\u002Fdocs\u002Ffiles\">files\u003C\u002Fa>).\u003C\u002Fli>\n\u003Cli>\u003Cstrong>The 15-minute token.\u003C\u002Fstrong> A clip that outlasts the interaction token is posted with the bot&#39;s own token, in the same channel, with the user mentioned.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>A bot that serves many servers should stop polling each job. Add an endpoint under \u003Cstrong>Webhooks\u003C\u002Fstrong> in the dashboard, and Frameport posts the generation to your server the moment it settles, signed with your endpoint&#39;s secret (\u003Ca href=\"\u002Fdocs\u002Fwebhooks\">webhooks\u003C\u002Fa>). Keep a table of generation ids and the channels that asked for them, and post when the delivery arrives. \u003Ca href=\"\u002Fblog\u002Fpolling-vs-webhooks-ai-jobs\">Polling vs webhooks\u003C\u002Fa> weighs the two, and how to combine them.\u003C\u002Fp>\n\u003Ch2 id=\"budgets-and-abuse\">Budgets and abuse\u003C\u002Fh2>\n\u003Cp>A public bot spends your money on behalf of strangers, so give it limits at every level:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\u003Cstrong>Per server, per day.\u003C\u002Fstrong> The \u003Ccode>spent\u003C\u002Fcode> table above refuses requests past \u003Ccode>SERVER_DAILY_BUDGET\u003C\u002Fcode>. In production, keep it in a database, so a restart does not reset it.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Per user.\u003C\u002Fstrong> The cooldowns stop one person from queuing a hundred jobs: one image every 30 seconds, one clip every two minutes.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Per workspace.\u003C\u002Fstrong> All the keys of a workspace share 60 requests that start work a minute and 20 jobs running at once. Past either, the API answers \u003Ccode>429\u003C\u002Fcode> with a \u003Ccode>Retry-After\u003C\u002Fcode> header, and the bot passes the message on (\u003Ca href=\"\u002Fdocs\u002Frate-limits\">rate limits\u003C\u002Fa>).\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Per request.\u003C\u002Fstrong> \u003Ccode>max_cost_usd\u003C\u002Fcode> refuses anything priced above the quote.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>A record.\u003C\u002Fstrong> Log the Discord user id next to each generation id, so you can act on a report about an image.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>Every workspace starts with its content filter on, and a public server is where it belongs. A prompt it blocks is refused with \u003Ccode>400 content_filtered\u003C\u002Fcode> before anything is held. The filter is a workspace setting shared by every key, so a bot that needs another setting runs in a workspace of its own. In that workspace, only an owner or an admin aged 18 or older can turn the filter off, in \u003Cstrong>Settings\u003C\u002Fstrong>; then our own models, such as Frameport Image 1, render with no content filter. That is what an unrestricted Discord bot means here, and it has limits: models from other makers, such as Nano Banana 2.1 and Grok Imagine, keep their makers&#39; policies and may refuse, and the \u003Ca href=\"\u002Facceptable-use\">acceptable use policy\u003C\u002Fa> applies either way: nothing involving minors, no real identifiable people without their consent, nothing illegal. You answer for what people make through your keys, and Discord&#39;s own rules apply to what your bot posts. A refused request costs nothing.\u003C\u002Fp>\n\u003Cp>Give the bot a key of its own, kept on the server (\u003Ca href=\"\u002Fblog\u002Fapi-key-security-ai-generation\">API key security\u003C\u002Fa>), and to let people start from their own pictures, see \u003Ca href=\"\u002Fblog\u002Fupload-files-to-ai-generation-api\">how to upload an image to the API\u003C\u002Fa>.\u003C\u002Fp>",{"type":47,"id":47,"title":48,"items":66},[67,71,75,79,83],{"q":68,"html":69,"text":70},"How do I make a Discord bot that generates images?","\u003Cp>Register a slash command, defer the reply as soon as it arrives, send the prompt to an image API from your bot&#39;s server, wait for the job, then post the file as an attachment. The script above does all of it with discord.py and one Frameport key.\u003C\u002Fp>","Register a slash command, defer the reply as soon as it arrives, send the prompt to an image API from your bot's server, wait for the job, then post the file as an attachment. The script above does all of it with discord.py and one Frameport key.",{"q":72,"html":73,"text":74},"Can I use Midjourney in my own Discord bot?","\u003Cp>Not through Frameport: Midjourney is not in the catalog. The bot above uses models that are, such as Nano Banana 2.1 and Frameport Image 1, on one key. The \u003Ca href=\"\u002Fblog\u002Fmidjourney-api-alternative\">Midjourney API alternative\u003C\u002Fa> compares the options.\u003C\u002Fp>","Not through Frameport: Midjourney is not in the catalog. The bot above uses models that are, such as Nano Banana 2.1 and Frameport Image 1, on one key. The Midjourney API alternative compares the options.",{"q":76,"html":77,"text":78},"Can a Discord bot edit pictures?","\u003Cp>Yes. Take the picture as an attachment option and send its URL in \u003Ccode>reference_images\u003C\u002Fcode> to a model that edits by instruction, such as Frameport Image 1 or Nano Banana Pro, with the change written in the prompt.\u003C\u002Fp>","Yes. Take the picture as an attachment option and send its URL in reference_images to a model that edits by instruction, such as Frameport Image 1 or Nano Banana Pro, with the change written in the prompt.",{"q":80,"html":81,"text":82},"Why does my bot say \"The application did not respond\"?","\u003Cp>It did not answer within Discord&#39;s three seconds. Defer the reply first, then generate: \u003Ccode>interaction.response.defer()\u003C\u002Fcode> must run before any slow call.\u003C\u002Fp>","It did not answer within Discord's three seconds. Defer the reply first, then generate: interaction.response.defer() must run before any slow call.",{"q":84,"html":85,"text":86},"Is there a free Discord AI image generator bot?","\u003Cp>Not one that renders for free. Your account, the API key and price quotes cost nothing, and a job that fails is never charged, but each image or clip is paid from a prepaid balance, from $0.025 an image. You can try the prompts in the \u003Ca href=\"\u002Fstudio?model=nano-banana-2-1\">Studio\u003C\u002Fa> before you wire them into the bot.\u003C\u002Fp>","Not one that renders for free. Your account, the API key and price quotes cost nothing, and a job that fails is never charged, but each image or clip is paid from a prepaid balance, from $0.025 an image. You can try the prompts in the Studio before you wire them into the bot.",[88,89,90,91,92],{"q":68,"html":69,"text":70},{"q":72,"html":73,"text":74},{"q":76,"html":77,"text":78},{"q":80,"html":81,"text":82},{"q":84,"html":85,"text":86},[94,107,116],{"slug":95,"path":96,"title":97,"description":98,"category":99,"categoryLabel":100,"date":11,"updated":11,"readingMinutes":101,"models":102,"featured":17},"ai-image-generation-api-cost","\u002Fblog\u002Fai-image-generation-api-cost","AI Image Generation API Cost per Image, by Model","Image generation API cost per image, model by model: what a batch and 1,000 images cost, reference pictures, and why a failed image costs nothing.","pricing","Pricing",4,[103,104,105,106,15,14],"nano-banana-pro","gpt-image-2-5-sunburst","seedream-5-0-pro","flux-3-image",{"slug":108,"path":109,"title":110,"description":111,"category":99,"categoryLabel":100,"date":11,"updated":11,"readingMinutes":12,"models":112,"featured":17},"cheapest-image-generation-api","\u002Fblog\u002Fcheapest-image-generation-api","Cheapest Image Generation API Models (2026)","The cheapest image generation API models in our catalog, what each gives up for its price, and how batches and per-image billing set the real cost.",[15,113,114,14,115],"fp-image-2","fp-image-3","grok-imagine-2-0",{"slug":117,"path":118,"title":119,"description":120,"category":99,"categoryLabel":100,"date":11,"updated":11,"readingMinutes":12,"models":121,"featured":17},"free-image-generation-api","\u002Fblog\u002Ffree-image-generation-api","Free Image Generation API: Options and Limits","Is there a free image generation API? What free tiers and self-hosting cost you in limits and upkeep, and how to test paid models for a few cents.",[15,14,114,104],"\u002Fstudio",[124,141,149,158,185,203,223,239,254,269,284,298,309,322,335,348,361,371,379,387,396,404,413,420,439],{"id":113,"type":125,"name":126,"description":127,"maker":128,"family":128,"own":129,"image":130,"private":140},"image","Frameport Image 2","Photoreal renders, up to 4 reference images.","Frameport",true,{"pricing":131,"options":133},{"per_image":132,"per_extra_reference_image":-1},0.025,{"aspect_ratios":134,"max_images":101},[135,136,137,138,139],"1:1","3:4","4:3","9:16","16:9",{},{"id":114,"type":125,"name":142,"description":143,"maker":128,"family":128,"own":129,"image":144,"private":148},"Frameport Image 3","Clean photoreal renders for characters.",{"pricing":145,"options":146},{"per_image":132,"per_extra_reference_image":-1},{"aspect_ratios":147,"max_images":101},[135,136,137,138,139],{},{"id":15,"type":125,"name":150,"description":151,"maker":128,"family":128,"own":129,"image":152,"private":157},"Frameport Image 1","Generation and reference-driven renders, up to 10 reference images.",{"pricing":153,"options":155},{"per_image":132,"per_extra_reference_image":154},0.0025,{"aspect_ratios":156,"max_images":101},[135,136,137,138,139],{},{"id":159,"type":160,"name":161,"description":162,"maker":128,"family":163,"own":129,"video":164,"private":183},"fp-motion-1","video","Frameport Motion 1","Our video engine, with native sound.","Frameport Motion",{"pricing":165,"options":172},{"default_resolution":166,"per_second":167,"per_second_with_audio":-1,"aspect_ratio_multiplier":-1,"per_reference_image":-1,"per_frame_image":-1},"768p",{"480p":168,"768p":169,"1080p":170,"2K":171},0.02,0.06,0.08,0.095,{"resolutions":173,"durations":177,"aspect_ratios":181,"audio_toggle":129,"start_frame":129,"end_frame":129,"max_reference_images":101,"identity_resolutions":182,"seed":17,"negative_prompt":17},[174,166,175,176],"480p","1080p","2K",{"min":178,"max":179,"step":180},5,15,1,[139,138,135,137,136],[166,175],{"resolutions":184},[174,166],{"id":186,"type":160,"name":187,"description":188,"maker":189,"family":190,"own":17,"video":191},"seedance-2-5","Seedance 2.5","The long-take flagship — up to 30 seconds with sound","ByteDance","Seedance",{"pricing":192,"options":197},{"default_resolution":193,"per_second":194,"per_second_with_audio":-1,"aspect_ratio_multiplier":-1,"per_reference_image":-1,"per_frame_image":-1},"720p",{"480p":195,"720p":196},0.12,0.27,{"resolutions":198,"durations":199,"aspect_ratios":201,"audio_toggle":129,"start_frame":129,"end_frame":129,"max_reference_images":101,"identity_resolutions":-1,"seed":129,"negative_prompt":17},[174,193],{"min":101,"max":200,"step":180},30,[139,137,135,136,138,202],"21:9",{"id":204,"type":160,"name":205,"description":206,"maker":207,"family":208,"own":17,"video":209},"veo-3-1","Veo 3.1","Google’s flagship — up to 4K with native audio","Google","Veo",{"pricing":210,"options":216},{"default_resolution":175,"per_second":211,"per_second_with_audio":214,"aspect_ratio_multiplier":-1,"per_reference_image":-1,"per_frame_image":-1},{"720p":212,"1080p":212,"4K":213},0.235,0.465,{"720p":213,"1080p":213,"4K":215},0.695,{"resolutions":217,"durations":219,"aspect_ratios":221,"audio_toggle":129,"start_frame":129,"end_frame":129,"max_reference_images":222,"identity_resolutions":-1,"seed":129,"negative_prompt":129},[193,175,218],"4K",{"min":101,"max":220,"step":33},8,[139,138],3,{"id":224,"type":160,"name":225,"description":226,"maker":189,"family":190,"own":17,"video":227},"seedance-2-0","Seedance 2.0","Character consistency, up to 4K",{"pricing":228,"options":235},{"default_resolution":193,"per_second":229,"per_second_with_audio":-1,"aspect_ratio_multiplier":233,"per_reference_image":-1,"per_frame_image":-1},{"480p":170,"720p":230,"1080p":231,"4K":232},0.175,0.435,0.9,{"21:9":234},1.32,{"resolutions":236,"durations":237,"aspect_ratios":238,"audio_toggle":129,"start_frame":129,"end_frame":129,"max_reference_images":101,"identity_resolutions":-1,"seed":129,"negative_prompt":17},[174,193,175,218],{"min":101,"max":179,"step":180},[139,137,135,136,138,202],{"id":240,"type":160,"name":241,"description":242,"maker":243,"family":244,"own":17,"video":245},"hailuo-3","Hailuo 3","2K cinematic physics, subject references","MiniMax","Hailuo",{"pricing":246,"options":250},{"default_resolution":176,"per_second":247,"per_second_with_audio":-1,"aspect_ratio_multiplier":-1,"per_reference_image":249,"per_frame_image":-1},{"2K":248},0.15,0.047,{"resolutions":251,"durations":252,"aspect_ratios":253,"audio_toggle":129,"start_frame":129,"end_frame":129,"max_reference_images":222,"identity_resolutions":-1,"seed":17,"negative_prompt":17},[176],{"min":178,"max":179,"step":180},[202,139,137,135,136,138],{"id":255,"type":160,"name":256,"description":257,"maker":258,"family":258,"own":17,"video":259},"runway-gen-4-5","Runway Gen-4.5","Cinematic motion, strong prompt adherence","Runway",{"pricing":260,"options":263},{"default_resolution":193,"per_second":261,"per_second_with_audio":-1,"aspect_ratio_multiplier":-1,"per_reference_image":-1,"per_frame_image":-1},{"720p":262},0.14,{"resolutions":264,"durations":265,"aspect_ratios":267,"audio_toggle":17,"start_frame":129,"end_frame":17,"max_reference_images":268,"identity_resolutions":-1,"seed":129,"negative_prompt":17},[193],{"min":33,"max":266,"step":180},10,[139,138],0,{"id":270,"type":160,"name":271,"description":272,"maker":207,"family":208,"own":17,"video":273},"veo-3-1-fast","Veo 3.1 Fast","Veo quality, faster and a quarter of the price",{"pricing":274,"options":280},{"default_resolution":193,"per_second":275,"per_second_with_audio":278,"aspect_ratio_multiplier":-1,"per_reference_image":-1,"per_frame_image":-1},{"720p":276,"1080p":195,"4K":277},0.093,0.29,{"720p":195,"1080p":262,"4K":279},0.35,{"resolutions":281,"durations":282,"aspect_ratios":283,"audio_toggle":129,"start_frame":129,"end_frame":129,"max_reference_images":222,"identity_resolutions":-1,"seed":129,"negative_prompt":129},[193,175,218],{"min":101,"max":220,"step":33},[139,138],{"id":285,"type":160,"name":286,"description":287,"maker":189,"family":190,"own":17,"video":288},"seedance-2-0-fast","Seedance 2.0 Fast","Seedance references and sound, faster",{"pricing":289,"options":294},{"default_resolution":193,"per_second":290,"per_second_with_audio":-1,"aspect_ratio_multiplier":293,"per_reference_image":-1,"per_frame_image":-1},{"480p":291,"720p":292},0.063,0.145,{"21:9":234},{"resolutions":295,"durations":296,"aspect_ratios":297,"audio_toggle":129,"start_frame":129,"end_frame":129,"max_reference_images":101,"identity_resolutions":-1,"seed":129,"negative_prompt":17},[174,193],{"min":101,"max":179,"step":180},[139,137,135,136,138,202],{"id":299,"type":160,"name":300,"description":301,"maker":243,"family":244,"own":17,"video":302},"hailuo-3-max","Hailuo 3 Max","Fast Hailuo motion, 768p",{"pricing":303,"options":305},{"default_resolution":166,"per_second":304,"per_second_with_audio":-1,"aspect_ratio_multiplier":-1,"per_reference_image":-1,"per_frame_image":-1},{"480p":169,"768p":276},{"resolutions":306,"durations":307,"aspect_ratios":308,"audio_toggle":17,"start_frame":129,"end_frame":129,"max_reference_images":268,"identity_resolutions":-1,"seed":17,"negative_prompt":17},[174,166],{"min":178,"max":179,"step":180},[202,139,137,135,136,138],{"id":16,"type":160,"name":310,"description":311,"maker":312,"family":310,"own":17,"video":313},"Grok Imagine","Quick clips from a prompt or a start image","xAI",{"pricing":314,"options":318},{"default_resolution":193,"per_second":315,"per_second_with_audio":-1,"aspect_ratio_multiplier":-1,"per_reference_image":-1,"per_frame_image":317},{"480p":276,"720p":316,"1080p":277},0.165,0.014,{"resolutions":319,"durations":320,"aspect_ratios":321,"audio_toggle":17,"start_frame":129,"end_frame":17,"max_reference_images":268,"identity_resolutions":-1,"seed":17,"negative_prompt":17},[174,193,175],{"min":180,"max":179,"step":180},[139,138,135,137,136],{"id":323,"type":160,"name":324,"description":-1,"maker":189,"family":190,"own":17,"video":325},"seedance-2-0-mini","Seedance 2.0 Mini",{"pricing":326,"options":331},{"default_resolution":174,"per_second":327,"per_second_with_audio":-1,"aspect_ratio_multiplier":330,"per_reference_image":-1,"per_frame_image":-1},{"480p":328,"720p":329},0.041,0.088,{"21:9":234},{"resolutions":332,"durations":333,"aspect_ratios":334,"audio_toggle":129,"start_frame":129,"end_frame":129,"max_reference_images":101,"identity_resolutions":-1,"seed":129,"negative_prompt":17},[174,193],{"min":101,"max":179,"step":180},[139,137,135,136,138,202],{"id":336,"type":160,"name":337,"description":338,"maker":207,"family":208,"own":17,"video":339},"veo-3-1-lite","Veo 3.1 Lite","Veo with sound, on every account",{"pricing":340,"options":344},{"default_resolution":193,"per_second":341,"per_second_with_audio":343,"aspect_ratio_multiplier":-1,"per_reference_image":-1,"per_frame_image":-1},{"720p":342,"1080p":169},0.036,{"720p":169,"1080p":276},{"resolutions":345,"durations":346,"aspect_ratios":347,"audio_toggle":129,"start_frame":129,"end_frame":129,"max_reference_images":268,"identity_resolutions":-1,"seed":129,"negative_prompt":129},[193,175],{"min":101,"max":220,"step":33},[139,138],{"id":349,"type":160,"name":350,"description":351,"maker":352,"family":353,"own":17,"video":354},"wan-3","Wan 3.0","Up to 30 seconds, references and sound","Alibaba","Wan",{"pricing":355,"options":357},{"default_resolution":193,"per_second":356,"per_second_with_audio":-1,"aspect_ratio_multiplier":-1,"per_reference_image":-1,"per_frame_image":-1},{"480p":169,"720p":195,"1080p":212},{"resolutions":358,"durations":359,"aspect_ratios":360,"audio_toggle":129,"start_frame":129,"end_frame":17,"max_reference_images":222,"identity_resolutions":-1,"seed":129,"negative_prompt":17},[174,193,175],{"min":33,"max":200,"step":180},[139,137,135,136,138],{"id":104,"type":125,"name":362,"description":363,"maker":364,"family":365,"own":17,"image":366},"GPT Image 2.5 Sunburst","OpenAI's flagship — precise text, composition and control","OpenAI","GPT Image",{"pricing":367,"options":369},{"per_image":368,"per_extra_reference_image":-1},0.085,{"aspect_ratios":370,"max_images":101},[135,136,137,138,139],{"id":372,"type":125,"name":373,"description":374,"maker":364,"family":365,"own":17,"image":375},"gpt-image-2-5-flare","GPT Image 2.5 Flare","OpenAI's image model tuned for expressive, dramatic frames",{"pricing":376,"options":377},{"per_image":368,"per_extra_reference_image":-1},{"aspect_ratios":378,"max_images":101},[135,136,137,138,139],{"id":14,"type":125,"name":380,"description":381,"maker":207,"family":382,"own":17,"image":383},"Nano Banana 2.1","Google's fast multimodal image model","Nano Banana",{"pricing":384,"options":385},{"per_image":368,"per_extra_reference_image":-1},{"aspect_ratios":386,"max_images":101},[135,136,137,138,139],{"id":105,"type":125,"name":388,"description":389,"maker":189,"family":390,"own":17,"image":391},"Seedream 5.0 Pro","ByteDance's flagship — rich detail and texture","Seedream",{"pricing":392,"options":394},{"per_image":393,"per_extra_reference_image":-1},0.099,{"aspect_ratios":395,"max_images":101},[135,136,137,138,139],{"id":103,"type":125,"name":397,"description":398,"maker":207,"family":382,"own":17,"image":399},"Nano Banana Pro","Google's highest-fidelity image model",{"pricing":400,"options":402},{"per_image":401,"per_extra_reference_image":-1},0.16,{"aspect_ratios":403,"max_images":101},[135,136,137,138,139],{"id":106,"type":125,"name":405,"description":406,"maker":407,"family":408,"own":17,"image":409},"Flux 3 Image","Black Forest Labs' FLUX.3 — photoreal and typography","Black Forest Labs","Flux",{"pricing":410,"options":411},{"per_image":329,"per_extra_reference_image":-1},{"aspect_ratios":412,"max_images":101},[135,136,137,138,139],{"id":115,"type":125,"name":414,"description":415,"maker":312,"family":310,"own":17,"image":416},"Grok Imagine 2.0","xAI's fast, characterful image model",{"pricing":417,"options":418},{"per_image":329,"per_extra_reference_image":-1},{"aspect_ratios":419,"max_images":101},[135,136,137,138,139],{"id":421,"type":160,"name":422,"description":423,"maker":128,"family":424,"own":129,"edit":425,"video":433},"fp-replace-1","Frameport Replace 1","Up to four people in your clip replaced by the faces you send: moves, lips, scene and sound kept.","Frameport Replace",{"tool":426,"formats":427,"min_seconds":33,"max_seconds":266,"min_billed_seconds":33,"max_bytes":430,"max_frames":431,"fps":432,"max_faces":101},"replace",[428,429],"mp4","mov",64000000,600,24,{"pricing":434,"options":437},{"default_resolution":166,"per_second":435,"per_second_with_audio":-1,"aspect_ratio_multiplier":-1,"per_reference_image":-1,"per_frame_image":-1},{"768p":195,"1080p":436},0.25,{"resolutions":438,"durations":-1,"aspect_ratios":-1,"audio_toggle":-1,"start_frame":-1,"end_frame":-1,"max_reference_images":-1,"identity_resolutions":-1,"seed":-1,"negative_prompt":-1},[166,175],{"id":440,"type":160,"name":441,"description":442,"maker":128,"family":443,"own":129,"edit":444,"video":449},"fp-upscale-1","Frameport Upscale 1","Your clip at 1080p or 2K: the same motion, frame rate and sound, sharper detail.","Frameport Upscale",{"tool":445,"formats":446,"min_seconds":180,"max_seconds":200,"min_billed_seconds":178,"max_bytes":447,"max_frames":448,"fps":-1,"max_faces":-1},"upscale",[428,429],100000000,900,{"pricing":450,"options":454},{"default_resolution":175,"per_second":451,"per_second_with_audio":-1,"aspect_ratio_multiplier":-1,"per_reference_image":-1,"per_frame_image":-1},{"1080p":452,"2K":453},0.03,0.05,{"resolutions":455,"durations":-1,"aspect_ratios":-1,"audio_toggle":-1,"start_frame":-1,"end_frame":-1,"max_reference_images":-1,"identity_resolutions":-1,"seed":-1,"negative_prompt":-1},[175,176],1795901825273,"b270fb84-a112-44f2-9801-f99d6c2e889e"]