Create a gateway
Learn how to set up your first application on SuperAPI and configure it to improve your API performance.
Welcome to SuperAPI, the programmable API gateway that makes all your fetch APIs cacheable. This guide will walk you through setting up your first application on SuperAPI and configuring it to dramatically improve your API performance.
Overview
SuperAPI allows you to:
- Make traditionally non-cacheable APIs cacheable
- Reduce API response times by up to 10x
- Monitor both database and API changes to keep cache fresh
- Deploy globally to bring your API responses closer to users
Creating Your First Gateway
After logging in to SuperAPI, the first step is to create a gateway. A gateway acts as the entry point for all your API traffic, routing requests through SuperAPI's caching layer.
To create a gateway:
In the "Create a new Gateway" dialog, provide the following information: -
Unique name for your gateway: A descriptive name for your application
(e.g., superapi_application
) - Unique DNS for your gateway: This will be
your application's subdomain (e.g., superapi-application
) - Cloud
provider: Select where your application is hosted (AWS or GCP) - Region:
Choose the region closest to your application or users
Once created, your gateway will appear in the list with a "Deployed" status of "NO" initially. SuperAPI will begin provisioning your gateway infrastructure.
Exploring Your Gateway Details
After creating your gateway, you can view its details by clicking on its name in the gateway list. This will take you to the gateway details page where you can see:
- Gateway Name: The name you provided
- DNS: The full domain for your gateway (e.g.,
superapi-application.superapi.cloud
) - Cloud: The cloud provider you selected
- Region: The deployment region
From this page, you can access the controls to deploy your gateway and manage your cache once deployed.
Deploying Your Gateway
Once you've configured your database and endpoints, you can deploy your gateway by clicking the "Deploy" button on the gateway details page.
Note that the Deploy button will remain disabled until you've properly connected at least one database and configured at least one endpoint.
After successful deployment, your gateway is ready to use with the following features:
- Purge Cache: Clears all cached responses, forcing fresh data to be fetched
- Pause Cache: Temporarily disables caching without removing existing cached data
- You can start accessing your cached API responses. Use your SuperAPI DNS to call the API based on your configured API path, and add the required header
ss4_host
containing the origin API host. For example, if your original API call ishttps://api.stripe.com/v1/customers/cus_12345
, your SuperAPI cached call would behttps://my-payment-gateway.superapi.cloud/v1/customers/cus_12345
with headerss4_host: api.stripe.com
. This redirects your request through SuperAPI's caching layer while preserving the original API path structure.
What's Next?
In the next section, we'll walk through connecting your database to SuperAPI. This critical step enables SuperAPI's intelligent cache invalidation system and unlocks the full potential of the platform.
Next: Adding a Database to the gateway
Learn how to connect your database to enable intelligent cache invalidation
Need help? Contact our support team at founders@trysuperapi.com