Table of Contents:

How the API can help me

MagicPattern is a service that auto-generates graphics like patterns & gradients.

The MagicPattern API allows you to integrate engaging patterns into your existing application via a simple REST API.

Base URL



<aside> 💡 You can find the API key on the Account page on your dashboard.


MagicPattern uses API keys to allow access to the API. You can authenticate your API calls in two ways:

  1. MagicPattern expects the API key to be included in all API requests to the server in a header that looks like the following: Authorization: Bearer API_KEY
  2. Otherwise, you can pass your API key as a URL query parameters like the following:
  3. For POST request only, you can pass your API key with the JSON payload like the following: {… , "apiKey": "API_KEY"}

<aside> ⚠️ Don't publicly expose your API key!

The API has monthly credit limits (1 credit = 1 generated graphic). Then if your key becomes available to the public, other people might use it and reduce your available limit.

If you think your API key is leaked, you can always regenerate a new one on your MagicPattern account page.



The MagicPattern API uses the following status/error codes. The MagicPattern API rate limit is 60 requests per 60 seconds.

200 OK