Docs
Call Third Party APIs

Call Third Party APIs

MaskAPI makes it easy to call and manage third-party APIs from your custom endpoints. Whether you’re integrating with services like Stripe, OpenAI, or Airtable, MaskAPI lets you act as a proxy layer with full control over headers, data, timeouts, and logic.


🦹‍♂️ What is Mask Mode?

In MaskAPI Studio, Mask Mode lets your endpoint acts as a gateway between your frontend and an external API. This gives you:

  • A secure way to hide API keys and tokens from the frontend

  • Pre- or post-process external responses

  • Custom request/response formatting

  • Built-in debugging, timeouts, and status code handling


🌍 How to Set a Global Base URL

If you'd like to avoid repeating the same base URL (like https://api.openai.com) in every endpoint, follow these steps:

  1. Select your project

  2. Go to the "Settings" tab

  3. Under "Project Global Configurations" section

  4. Add your the URL in "Base URL" field

  5. Click "Save Changes" on the top of the page

All your endpoints in the project can use {{project-baseUrl}} as a placeholder in the URL field.


⚙️ How to Create a Mask Endpoint

If you a specific single endpoint to overwrite the Global Base URL, follow these steps:

  1. Select your project

  2. Go to the "Studio" tab

  3. Create a new endpoint

  4. Switch to "Mask" mode

  5. Set method (e.g. GET, POST)

  6. Set URL {{project-baseUrl}}/v1/completions (for example)

MaskAPI will replace {{project-baseUrl}} with the base URL from your project settings at runtime.


⚙️ How to Overwrite the Global Base URL

If you a specific single endpoint to overwrite the Global Base URL, follow these steps:

  1. Select your endpoint

  2. Replace {{project-baseUrl}}/v1/completions with https://api.openai.com/v1/completions (for example)

  3. Test and save


🧪 How to Test Your Endpoint

In order to test your API:

  • Use the Playground inside the Studio to send live test requests
  • Use console.log() inside your endpoint to inspect values
  • View logs and debug output directly in MaskAPI Studio