InstantGradient API
The InstantGradient API gives you programmatic access to palette generation, color data, and the community palette library. All endpoints are read-only and return JSON.
Authentication
All requests require an API key passed in the Authorization header:
curl https://instantgradient.com/api/v1/palette/generate \
-H "Authorization: Bearer ig_your_api_key_here"API keys are available to Pro subscribers. Generate yours in the dashboard.
Base URL
https://instantgradient.com/api/v1Endpoints
| Endpoint | Description | Credits |
|---|---|---|
GET /v1/palette/generate | Generate a harmonious palette | 1 |
GET /v1/palette/:slug | Look up a published palette | 1 |
GET /v1/palettes | Browse community palettes | Per item |
GET /v1/color/:hex | Look up a color | 1 |
GET /v1/colors | Search colors | Per item |
GET /v1/account | Check key status and credits | 0 |
Attribution
Any application or website that displays data from the InstantGradient API must include visible attribution. Add the following (or something similar) anywhere your users can see it:
Powered by <a href="https://instantgradient.com?utm_source=api&utm_medium=attribution">InstantGradient</a>The link must be a clickable hyperlink to https://instantgradient.com with the UTM parameters shown above so we can track API-sourced traffic while preserving the natural referrer. See the full requirements in our Terms of Service (Section 12.3).
Hex format
All hex color codes are lowercase 6-character strings without the # prefix. Example: 1e3a5f, not #1E3A5F.
Response format
Every response wraps data in a standard envelope:
{
"data": "...",
"meta": {
"request_id": "req_abc123def456",
"api_version": "v1",
"credits_used": 1,
"credits_remaining": 494,
"daily_limit": 500
}
}See Rate Limits and Errors for details on the meta and error formats.