Functions let you connect to any external API by turning your words into code. This guide will show you how, using the Exa AI Search API as an example.

Watch this step-by-step tutorial to see these principles in action:

Overview

Find API Documentation

Locate the API documentation and endpoints

Create Function

Let Create analyze the API and generate code

Add Credentials

Store API keys as secrets

Test & Build

Test the Function and integrate into your app

Step-by-Step Guide

1

Create a New Function

Start by creating a Function using any of these methods:

  • Logo Menu > New Function
  • Press option-F (or alt-F on Windows)
  • Type / in chat > Create Function
2

Find API Documentation

  1. Locate the API documentation for your service
  2. Find the specific endpoint you want to use
  3. Copy the documentation URL or endpoint details

For example, with Exa:

https://docs.exa.ai/reference/search

You can paste API documentation URLs directly into the Function chat - Create will screenshot them and write the necessary code.

3

Add API Credentials

Most APIs require authentication. Add your credentials as secrets:

  1. Open the “Secrets” panel from your Function’s 3-dot menu
  2. Click ”+ Add a new secret”
  3. Name it clearly (e.g. “EXA_API_KEY” for Exa)
  4. Enter your API key or token

Always use Secrets to store sensitive credentials.

4

Configure the Function

Tell Create what you want the Function to do:

  1. Paste the API documentation URL
  2. Describe the desired inputs and outputs
  3. Specify any error handling needs

Example prompt for Exa:

Create a search function that:
- Takes a search query as input
- Uses the Exa API endpoint from docs.exa.ai
- Returns the search results
5

Test the Integration

Verify your setup using the Function test panel:

  1. Open the 3-dot menu > Test
  2. Enter sample data
  3. Click “Run Test”
  4. Check the response

If you get errors, paste them back into your Function chat. Create often knows how to fix specific API issues.

6

Build the Frontend

Add your Function to a page or component:

  1. Type / in chat
  2. Select your Function
  3. Describe how you want to use it

Create will handle:

  • Loading states
  • Error messages
  • UI around the results

Common API Patterns

When working with external APIs:

  • Authentication: Most APIs require credentials (API keys, tokens, etc.)
  • Error Handling: Plan for different types of errors and prompt Create how you want to handle
  • Data Transformation: You may need to format data before/after API calls

Functions have a 5-minute timeout. For longer operations, consider chaining multiple Functions together.

Alternative Integration Methods

Can’t find an API’s documentation? You can also:

  • Use automation platforms like Zapier or Make
  • Screenshot API documentation for Create to analyze
  • Paste example CURL commands or request formats

Need help with a specific API? Join our Discord community and ask in #help-me-build