API Documentation

Complete reference for the Logrina API

Quick Start
Get started with the Logrina API in minutes

1. Get your API key

Visit your profile page to generate an API key.

2. Make your first request

curl -X POST https://your-domain.com/api/generate \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "brand": "TechCorp",
    "category": "minimalist",
    "count": 3
  }'
Authentication
How to authenticate your API requests

All API requests must include your API key in the Authorization header:

Authorization: Bearer lgr_your_api_key_here

Alternatively, you can use the X-API-Key header:

X-API-Key: lgr_your_api_key_here
Base URL
API endpoint base URL
https://your-domain.com/api
Endpoints
Available API endpoints
POST/api/generate

Generate one or more logos for your brand.

Request Body

{
  "brand": "TechCorp",           // Required: Brand name (1-100 chars)
  "category": "minimalist",      // Required: Logo category
  "count": 3,                    // Optional: Number of logos (1-6, default: 3)
  "size": "1024x1024",           // Optional: Image size (default: 1024x1024)
  "customInstruction": "...",    // Optional: Custom instructions (max 200 chars)
  "colors": ["#0066cc"],         // Optional: Custom colors (max 5)
  "modelId": "gemini-2.5-flash-image" // Optional: Model to use
}

Categories

3d-modernminimalistgradientvintagegamingreal-estaterestaurantwatercolormedicaltech

Response

{
  "items": [
    {
      "id": "item_123",
      "brand": "TechCorp",
      "category": "minimalist",
      "status": "processing",
      "model": "gemini-2.5-flash-image",
      "createdAt": "2026-01-29T10:00:00.000Z"
    }
  ],
  "message": "3 logos are on the way..."
}

Example

curl -X POST https://your-domain.com/api/generate \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "brand": "TechCorp",
    "category": "minimalist",
    "count": 3,
    "colors": ["#0066cc", "#ffffff"]
  }'
POST/api/external/generate-logo

Synchronous logo generation with polling. Waits up to 90 seconds for completion.

Request Body

{
  "brand": "TechCorp",
  "category": "minimalist",
  "count": 2,
  "size": "1024x1024"
}

Response

{
  "success": true,
  "logos": [
    {
      "id": "item_123",
      "brand": "TechCorp",
      "category": "minimalist",
      "fileUrl": "https://cdn.example.com/logo1.png",
      "thumbnailUrl": "https://cdn.example.com/thumb1.png",
      "width": 1024,
      "height": 1024
    }
  ],
  "completed": 2,
  "failed": 0,
  "total": 2
}
POST/api/chat

Chat with AI assistant and generate images within conversation.

Request Body

{
  "messages": [
    {
      "role": "user",
      "content": "Generate a futuristic cityscape"
    }
  ],
  "sessionId": "session_123",        // Optional
  "imageSize": "1024x1024",          // Optional
  "modelId": "gemini-2.5-flash-image" // Optional
}

Returns a streaming text response. Check response headers for:

  • X-Session-ID - Chat session ID
  • X-Generated-Image - Generated image URL (if applicable)
GET/api/models

Get list of available AI models for logo generation.

Response

{
  "models": [
    {
      "id": "gemini-2.5-flash-image",
      "name": "Gemini 2.5 Flash Image",
      "provider": "gemini",
      "description": "Google's Gemini 2.5 Flash for fast image generation",
      "maxImages": 8,
      "supportedSizes": ["1024x1024", "1792x1024", "1024x1536"],
      "defaultSize": "1024x1024"
    }
  ]
}
Rate Limits
API usage limits
Authenticated requests100 requests/minute
Logo generation6 logos per request max
Chat requests50 requests/minute

Rate limit information is included in response headers:

X-RateLimit-Limit: 100 X-RateLimit-Remaining: 95 X-RateLimit-Reset: 1643723400
Error Handling
Understanding API errors

All errors follow this format:

{
  "error": "Descriptive error message"
}

Common Error Codes

400

Bad Request

Invalid parameters in request

401

Unauthorized

Missing or invalid API key

429

Too Many Requests

Rate limit exceeded

500

Internal Server Error

Server error, please try again

Code Examples
Integration examples in different languages

Node.js / JavaScript

const LOGRINA_API_KEY = 'lgr_your_api_key_here'

async function generateLogos() {
  const response = await fetch('https://your-domain.com/api/generate', {
    method: 'POST',
    headers: {
      'Authorization': `Bearer ${LOGRINA_API_KEY}`,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      brand: 'TechCorp',
      category: 'minimalist',
      count: 3
    })
  })

  const data = await response.json()
  console.log('Generated logos:', data.items)
  return data
}

generateLogos()

Python

import requests

LOGRINA_API_KEY = 'lgr_your_api_key_here'

def generate_logos():
    response = requests.post(
        'https://your-domain.com/api/generate',
        headers={
            'Authorization': f'Bearer {LOGRINA_API_KEY}',
            'Content-Type': 'application/json'
        },
        json={
            'brand': 'TechCorp',
            'category': 'minimalist',
            'count': 3
        }
    )

    data = response.json()
    print('Generated logos:', data['items'])
    return data

generate_logos()
Support
Need help?