API Reference

Complete documentation for the ColorGenius API. Build amazing color experiences with our powerful, easy-to-use REST API.

Quick Start

Generate Your First Palette

Get started with the ColorGenius API in minutes. Here is a simple example.

// Generate a palette
const response = await fetch('https://api.colorgenius.dev/v1/palettes/generate', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    baseColor: '#3B82F6',
    harmony: 'complementary',
    count: 5
  })
});

const palette = await response.json();
console.log(palette.colors);

Why Choose Our API?

Fast Response Times

Sub-100ms response times with global CDN distribution

Secure Authentication

API key and OAuth 2.0 authentication options

Global Infrastructure

99.9% uptime with servers across 6 continents

RESTful Design

Clean, predictable REST API with comprehensive documentation

API Endpoints

POST
/v1/palettes/generate

Generate a new color palette based on input parameters

Palette Generation
GET
/v1/palettes/{id}

Retrieve a specific palette by its ID

Palette Management
GET
/v1/colors/harmony

Find harmonious colors for a given base color

Color Analysis
POST
/v1/colors/contrast

Check contrast ratio between two colors

Accessibility
GET
/v1/palettes/trending

Get currently trending color palettes

Discovery
POST
/v1/export/{format}

Export palette in various formats (CSS, JSON, etc.)

Export

Authentication

API Key Authentication

Authenticate your requests using your API key in the Authorization header.

Authorization: Bearer YOUR_API_KEY

You can obtain your API key from the after creating an account.

Rate Limits

Free Tier

1,000

requests per month

Pro Tier

100,000

requests per month

Enterprise

Unlimited

custom rate limits

Need Help?

Our developer support team is here to help you integrate the ColorGenius API.