Reve Art API Documentation

Welcome to Reve Art's image generation API. The service provides state-of-the-art AI-powered image generation capabilities through a simple REST API.

Introduction to Reve Image 1.0

Reve Image 1.0 is our flagship text-to-image generation model, designed with a focus on:

  • Superior prompt adherence
  • High aesthetic quality
  • Accurate typography rendering
  • Intuitive text-to-image generation

The model is engineered to produce high-quality results without requiring advanced prompt engineering expertise, making it accessible to both beginners and experienced users. You can try it for free at Create Image.

Use Cases

Reve Art API can be integrated into various applications:

  • Content Creation: Generate unique visuals for blogs, articles, and social media
  • E-commerce: Create product mockups and variations
  • Design & Prototyping: Quickly visualize design concepts
  • Gaming & Entertainment: Generate game assets and character designs
  • Education: Create educational materials and illustrations

Authentication

All API requests require authentication using an API key.

Add the API key to the Authorization header:

bash
curl -X POST https://reve-art.com/v1/reve-image/generate \
-H "Authorization: Bearer your_api_key" \
-H "Content-Type: application/json" \
-d '{"prompt": "your prompt here", "aspect_ratio": "1:1"}'

How to get API Key

Please login and add your api-key in the Dashboard > API Key page.

Then use the api-key to generate images.

Generate Image

The image generation endpoint allows you to create images from text descriptions. You can control various aspects of the generation process through parameters.

Best Practices

  1. Prompt Engineering

    • Be specific and descriptive in your prompts
    • Use artistic terms for style guidance
    • Include details about lighting, perspective, and mood
  2. Aspect Ratio Selection

    • Choose based on your intended use case
    • 1:1 for social media posts
    • 16:9 for presentations/banners
    • 9:16 for mobile content
  3. Async Generation

    • Use async=true for longer generations
    • Implement status polling for better user experience

POST /v1/images/generate

Request Body

{
  "prompt": "string",           // Required: The image generation prompt
  "negative_prompt": "string",  // Optional: Things to avoid in the image
  "aspect_ratio": "string",    // Required: Image aspect ratio (default: "1:1")
  "async": boolean             // Optional: Async generation (default: false)
}

Aspect Ratio

The aspect ratio of the image. Supported ratios: "1:1", "16:9", "4:3", "3:4", "9:16", "2:3", "3:2".

Synchronous Response

{
  "id": "img_123",
  "status": "completed",
  "url": "https://cdn.reve-art.com/img_123.png",
  "metadata": {
    "prompt": "your prompt",
    "width": 1024,
    "height": 1024,
    "created_at": "2024-01-01T00:00:00Z"
  }
}

Asynchronous Response

{
  "id": "img_123",
  "status": "pending"
}

Example Usage

Python:

import requests

api_key = "your_api_key"
headers = {
    "Authorization": f"Bearer {api_key}",
    "Content-Type": "application/json"
}

response = requests.post(
    "https://api.reve-art.com/v1/reve-image/generate",
    headers=headers,
    json={
        "prompt": "a beautiful sunset over mountains",
        "aspect_ratio": "16:9"
    }
)

if response.ok:
    result = response.json()
    print(f"Image URL: {result['url']}")
else:
    print(f"Error: {response.text}")

Node.js:

async function generateImage(prompt: string) {
  const response = await fetch("https://api.reve-art.com/v1/reve-image/generate", {
    method: "POST",
    headers: {
      "Authorization": `Bearer ${apiKey}`,
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      prompt,
      aspect_ratio: "1:1",
      async: true,
    }),
  });

  if (!response.ok) {
    throw new Error(`Failed to generate image: ${response.statusText}`);
  }

  const result = await response.json();
  
  if (result.status === "pending") {
    // Poll for completion
    return await checkImageStatus(result.id);
  }

  return result;
}

Check Image Status

GET /v1/reve-image/status/image_id

Response

{
  "id": "img_123",
  "status": "completed",
  "url": "https://cdn.reve-art.com/img_123.png",
  "metadata": {
    "prompt": "original prompt",
    "width": 1024,
    "height": 1024,
    "model": "text2image_v1",
    "created_at": "2024-01-01T00:00:00Z"
  }
}

Example Usage

async function checkImageStatus(imageId: string) {
  const response = await fetch(
    `https://reve-art.com/v1/reve-image/status/${imageId}/`,
    {
      headers: {
        "Authorization": `Bearer ${apiKey}`,
      },
    }
  );

  if (!response.ok) {
    throw new Error(`Failed to check status: ${response.statusText}`);
  }

  return await response.json();
}

Rate Limits

API requests are limited by your subscription plan and available credits.

  • Each image generation costs 1 credit
  • Free plan: 3 credits included
  • Basic plan: 100 credits per month
  • Rate limit: 10 requests per minute
  • If you need more credits, please upgrade your plan or buy more credits.