LogoAvatarMe Docs
LogoAvatarMe Docs
Homepage

Getting Started

Quick Start

Telegram

API Reference

AvatarMe API Documentation

Overview

The AvatarMe API allows you to integrate AI image generation into your applications. All models are accessible through a unified API interface.

Authentication

All API requests require an API key. Get your key from the dashboard.

Authorization: Bearer YOUR_API_KEY

Generate Image

Generate an image from a text prompt.

Endpoint

POST https://api.avatarme.app/v1/generate

Request Body

{
  "model": "gpt-image-1.5",
  "prompt": "A modern coffee shop with warm lighting",
  "size": "1024x1024",
  "quality": "high"
}

Parameters

ParameterTypeRequiredDescription
modelstringYesModel to use for generation
promptstringYesText description of the image
sizestringNoImage size (default: 1024x1024)
qualitystringNoQuality level: standard, high

Available Models

Model IDDescription
gpt-image-1.5OpenAI GPT Image 1.5
flux-2Black Forest Labs FLUX.2
midjourney-v7Midjourney v7
hidream-i1HiDream-I1
nano-banana-proGoogle Nano Banana Pro
recraftRecraft

Response

{
  "id": "img_abc123",
  "url": "https://cdn.avatarme.app/images/abc123.png",
  "model": "gpt-image-1.5",
  "prompt": "A modern coffee shop with warm lighting",
  "created_at": "2026-01-15T10:30:00Z"
}

Code Examples

JavaScript/TypeScript

const response = await fetch('https://api.avatarme.app/v1/generate', {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    model: 'flux-2',
    prompt: 'Professional product photo of headphones',
    size: '1024x1024',
  }),
});

const data = await response.json();
console.log(data.url);

Python

import requests

response = requests.post(
    'https://api.avatarme.app/v1/generate',
    headers={'Authorization': f'Bearer {API_KEY}'},
    json={
        'model': 'flux-2',
        'prompt': 'Professional product photo of headphones',
        'size': '1024x1024',
    }
)

data = response.json()
print(data['url'])

cURL

curl -X POST https://api.avatarme.app/v1/generate \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "flux-2",
    "prompt": "Professional product photo of headphones",
    "size": "1024x1024"
  }'

Rate Limits

PlanRequests/minuteRequests/day
Free550
Pro601,000
Lifetime120Unlimited

Error Codes

CodeDescription
400Bad request - Invalid parameters
401Unauthorized - Invalid API key
429Rate limit exceeded
500Server error

Learn More

Models Guide

Learn about available models

Pricing

View API pricing plans

Table of Contents

Overview
Authentication
Generate Image
Endpoint
Request Body
Parameters
Available Models
Response
Code Examples
JavaScript/TypeScript
Python
cURL
Rate Limits
Error Codes
Learn More