AI Logo Generation API — Create Brand Assets Programmatically (2026)
You're building a SaaS platform where every new workspace needs a unique logo — and you have thousands of signups queued. Generating brand assets by hand doesn't scale. With an AI image generation API, you can produce logo variants, icon sets, and identity assets in seconds at a few cents per image.
This guide shows how to call the GenRelay API to generate logos and icons using Nano Banana Pro and GPT-image-2, with copy-paste Python and curl examples.
What Is the AI Logo Generation API?
The GenRelay image generation API is a unified REST endpoint that routes image requests to top-tier models. For logo and icon work, two models are most useful:
- Nano Banana Pro — high-fidelity image synthesis with optional reference-guided generation. Strong for generating consistent brand iconography and styled wordmarks at 1K–4K resolution.
- GPT-image-2 — instruction-based image editing. Best for iterating on an existing logo draft: swap the color palette, simplify the icon shape, generate a dark-mode variant.
Both are available at https://genrelay.ai/v1/images/generations using a standard Bearer token.
How Do I Authenticate with the GenRelay API?
Authentication uses a Bearer token in the Authorization header. All requests are HTTPS.
import requests
API_KEY = "YOUR_GENRELAY_KEY"
headers = {
"Authorization": f"Bearer {API_KEY}",
"Content-Type": "application/json"
}
Get your API key from the GenRelay console at genrelay.ai. Free credits are included on signup — no credit card required to test.
How Do I Generate a Logo with Nano Banana Pro?
Nano Banana Pro returns a synchronous response. Send a prompt and target resolution, and the API returns an image URL directly.
import requests
API_KEY = "YOUR_GENRELAY_KEY"
response = requests.post(
"https://genrelay.ai/v1/images/generations",
headers={
"Authorization": f"Bearer {API_KEY}",
"Content-Type": "application/json"
},
json={
"model": "nano-banana-pro",
"prompt": (
"Minimalist flat vector logo for a developer tools company. "
"A stylized circuit node forming the letter G. "
"Color palette: deep navy #1A237E and electric teal #00BCD4. "
"White background. Clean lines, icon-scale readable."
),
"size": "1024x1024",
"n": 1
}
)
data = response.json()
image_url = data["data"][0]["url"]
print(f"Logo URL: {image_url}")
Prompt strategies for logos:
- Name the visual style explicitly: "flat vector", "minimalist", "geometric", "badge style", "lettermark"
- Specify the color palette — hex codes or named colors both work
- Include "white background" or "transparent background" to control the canvas
- Add "icon-scale readable" to steer toward simplified, clean shapes that hold up at small sizes
Nano Banana Pro Image Parameters
| Parameter | Values | Notes |
|---|---|---|
size |
1024x1024, 2048x2048, 4096x4096 |
1K covers most web/app use cases |
n |
1–4 | Variants returned per call |
prompt |
string, up to 4096 chars | Include style, palette, background |
How Do I Edit an Existing Logo with GPT-image-2?
GPT-image-2 accepts an existing image plus a natural-language instruction and returns a modified version. This is the fastest way to generate color-scheme variants, dark-mode versions, or simplified icon derivatives.
import requests
import base64
API_KEY = "YOUR_GENRELAY_KEY"
with open("logo_v1.png", "rb") as f:
image_b64 = base64.b64encode(f.read()).decode()
response = requests.post(
"https://genrelay.ai/v1/images/edits",
headers={
"Authorization": f"Bearer {API_KEY}",
"Content-Type": "application/json"
},
json={
"model": "gpt-image-2",
"image": image_b64,
"prompt": (
"Replace the white background with transparent. "
"Change the teal accent to coral orange #FF6B35. "
"Keep the icon shape and typography unchanged."
)
}
)
edited_url = response.json()["data"][0]["url"]
print(f"Edited logo: {edited_url}")
GPT-image-2 works well for:
- Color palette swaps across brand variants
- Background removal or replacement
- Generating monochrome or single-color versions
- Adding or updating text elements within the image
For more on instruction-based editing, see the AI image editing API guide.
How Much Does Logo Generation Cost via API?
As of September 2026, GenRelay pricing per image:
| Model | Resolution | Price per image |
|---|---|---|
| Nano Banana Pro | 1024×1024 (1K) | $0.030 |
| Nano Banana Pro | 2048×2048 (2K) | $0.030 |
| Nano Banana Pro | 4096×4096 (4K) | $0.042 |
| Nano Banana 2 | 1024×1024 (1K) | $0.020 |
| Nano Banana 2 | 4096×4096 (4K) | $0.036 |
| GPT-image-2 | Standard | $0.014 |
Worked examples:
- SaaS onboarding — 3 logo variants per new user at 1K with Nano Banana Pro:
$0.030 × 3 = $0.09 per user - Icon library build — 500 unique icons at 1K with Nano Banana 2:
$0.020 × 500 = $10.00 - Color palette variants — 1,000 GPT-image-2 edits of an existing logo:
$0.014 × 1,000 = $14.00
For high-volume icon generation where cost efficiency matters more than maximum output fidelity, Nano Banana 2 at $0.020/image is the pragmatic choice. For polished brand assets, Nano Banana Pro at $0.030 returns noticeably sharper detail and better color rendering.
How Do I Generate Multiple Logo Variants in Parallel?
Use Python's asyncio and aiohttp to fire all variant requests concurrently. Wall-clock time equals the slowest single generation, not the sum.
import asyncio
import aiohttp
API_KEY = "YOUR_GENRELAY_KEY"
BASE_URL = "https://genrelay.ai/v1/images/generations"
STYLE_VARIANTS = [
"Minimalist flat vector logo, deep navy and teal, white background, lettermark G",
"Bold geometric badge logo, deep navy and teal, white background, circular frame",
"Wordmark logo, sans-serif typography, deep navy, white background, no icon",
]
async def generate_logo(session, prompt):
async with session.post(
BASE_URL,
headers={"Authorization": f"Bearer {API_KEY}"},
json={
"model": "nano-banana-pro",
"prompt": prompt,
"size": "1024x1024"
}
) as resp:
data = await resp.json()
return data["data"][0]["url"]
async def main():
async with aiohttp.ClientSession() as session:
tasks = [generate_logo(session, p) for p in STYLE_VARIANTS]
urls = await asyncio.gather(*tasks)
for i, url in enumerate(urls):
print(f"Variant {i + 1}: {url}")
asyncio.run(main())
Three variants, fired in parallel, cost $0.030 × 3 = $0.09 total and finish in one generation cycle.
For larger batches with error handling and retry logic, see the batch image generation API guide.
Internal Links
- Model details: Nano Banana Pro on GenRelay
- Instruction-based editing: GPT-image-2 on GenRelay
- Related: AI image aspect ratio API — generate logos in 1:1, 16:9, and portrait formats
FAQ
Does the API return SVG output?
No. Nano Banana Pro and GPT-image-2 return raster images (PNG or JPEG). For SVG workflows, generate at 4K resolution and pass the output through a raster-to-vector tool such as Inkscape's trace or a dedicated vectorization service.
What resolution should I use for logos?
1024×1024 is sufficient for web and app use. Use 4096×4096 if you need print-quality output or plan to scale up significantly. At Nano Banana Pro pricing, 1K costs $0.030 and 4K costs $0.042 — a 40% premium for 16× the pixel area.
Can I use a reference image to keep brand elements consistent across variants?
Yes. Nano Banana Pro supports reference-guided generation — pass a reference image to anchor color palette, icon style, and overall aesthetic. See the consistent AI image API guide for the full parameter setup.
How do I get a transparent background?
Include "transparent background" in the Nano Banana Pro prompt. For guaranteed alpha-channel output, follow up with a GPT-image-2 edit instruction: "Remove the background and make it transparent."
What happens if the generated logo contains unexpected text or artifacts?
Refine the prompt — add "no text", "no watermarks", or "clean edges" as needed. For production batch workflows, run a generation quality check and automatically re-queue jobs where the output URL returns a failed status.
As of September 2026. Pricing subject to change — verify current rates at genrelay.ai.