Skip to main content

Creating custom integrations for your apps

Build a custom integration you can use across your apps and share with your team. Keep it in your private catalog, or submit it to the Integration Catalog for review and earn credits if approved. This works for any API-powered integration across a wide range of platforms.
Create a public integration that gets approved and we will add 250 credits to your account.
This video uses an earlier version of the platform, but the flow is the same.

Step 1 | Create a new custom integration

Enter the key details for your custom integration, including name, description, logo, example prompts, and visibility.
Before you begin, make sure you have:
  • An API key for the service you are connecting, for example OpenAI keys start with sk-.
  • A square image in PNG or JPG, recommended size 256×256.
  • 3–5 example prompts to help others understand how to use the integration.
To create an integration:
  1. Go to the Integrations Catalog.
  2. Click the My Integrations tab.
  3. Click Create Integration.
  4. Click Create New Integration.
  5. Enter the integration details:
    • Integration Name: Give your integration a clear and descriptive name.
    • Description: Explain what the integration does and its main use case.
    • Upload Logo: Add a 256×256 PNG or JPG image.
    • Example Prompts: Add 3–5 prompts to show how your integration works.
    • Integration Visibility: Keep it private, or set to Public to submit it for review in the Integration Catalog.
  6. Click Continue to Integration Content.
Integration Metadata tab with fields for name, description, logo, prompts, and visibility.

Step 2 | Configure your integration

Configure the core functionality of your integration, define required secrets, and add the instructions Base44 will use to run it. When you’re ready, click Save Integration at the bottom.
Keep Backend function turned on. This lets Base44 call external APIs securely without exposing credentials.Backend function toggle in the integration settings.
List the secrets your integration needs. At this stage, you are declaring required secrets, not adding values. When you or your team connect this integration to an app, you will be asked to enter the real values securely.To define secrets:
  1. In the Integration Content tab, enter each required secret:
  2. Click Add API Key.
  3. Repeat for any additional secrets this integration needs.
Secret values are stored per app, not in the catalog. App owners add them in DashboardSecrets when they use the integration.
Integration keys section with fields for name and how to obtain it.
Provide an instruction set (or “integration prompt”) that tells Base44 how to connect and interact with the API. This should include endpoints, parameters, and code samples if needed. The instructions are used by Base44’s AI to run the integration.Integration prompt editor showing instructions and a code sample.
Click on the example below to see the prompt for OpenAI’s image generation API. If you are integrating with a different service, replace the endpoint and parameters to match that API.
Only edit the code below if you are comfortable with JavaScript/Deno. If you want to use OpenAI image generation, paste as shown.
# OpenAI Text to Image Integration

## 1. Overview
This integration generates images based on natural language prompts using OpenAI's DALL·E model.

## 2. Environment Variables
```json
[
{
"name": "OPENAI_API_KEY",
"description": "Your OpenAI secret API key (starts with sk-...)",
"how_to_get": "https://platform.openai.com/account/api-keys"
}
]
```

## 3. Backend Function (Deno)
```ts
Deno.serve(async (req) => {
const OPENAI_API_KEY = Deno.env.get("OPENAI_API_KEY");

if (!OPENAI_API_KEY) {
return new Response(JSON.stringify({ error: "Missing API key configuration" }), {
status: 500,
headers: { "Content-Type": "application/json" }
});
}

let prompt;
try {
({ prompt } = await req.json());
} catch {
return new Response(JSON.stringify({ error: "Invalid JSON" }), {
status: 400,
headers: { "Content-Type": "application/json" }
});
}

if (!prompt) {
return new Response(JSON.stringify({ error: "Missing prompt" }), {
status: 400,
headers: { "Content-Type": "application/json" }
});
}

const response = await fetch("https://api.openai.com/v1/images/generations", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": `Bearer ${OPENAI_API_KEY}`
},
body: JSON.stringify({
prompt,
model: "dall-e-3",
n: 1,
size: "1024x1024"
})
});

const data = await response.json();

if (!response.ok) {
return new Response(JSON.stringify({ error: data }), {
status: response.status,
headers: { "Content-Type": "application/json" }
});
}

return new Response(JSON.stringify(data), {
status: 200,
headers: { "Content-Type": "application/json" }
});
});
```

## 4. Frontend Component (Optional)
```tsx
const generateImage = async (prompt: string) => {
const res = await fetch("/functions/openai-image.js", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ prompt })
});

const result = await res.json();
return result?.data?.[0]?.url || null;
};
```

## 5. Usage & Examples
- Prompt: "Generate an image of a futuristic flying car"  
- User types prompt → Backend calls OpenAI → Returns image URL

## 6. Research Summary & Resources
- [OpenAI Image Generation Docs](https://platform.openai.com/docs/api-reference/images/create)  
- API: `POST https://api.openai.com/v1/images/generations`
If you want to customize the prompt, here’s what each main part does:
  • Read your API key: Securely access the key from environment variables.
  • Accept a user request: Handle the prompt or input from the user.
  • Send the request to the API: Make the API call (for example, to OpenAI’s endpoint).
  • Get the response: Process the API’s result.
  • Return it to the app: Pass the result back for display in chat or another interface.
For other platforms, update the endpoint, request format, and response handling based on their documentation.

Step 3 | Test your integration

Test the integration by building a new app that uses it, then running a prompt to verify everything works as expected. To test your integration:
  1. Go to your integration page and click Use this integration.
  2. Describe the app you want to create with this integration.
  3. Define secrets under Required API keys:
    • New value: Paste the API key.
    • Reuse existing: Select a previously saved secret for this app.
  4. Prompt the AI chat to test, for example: Generate an image of a panda surfing a wave.
Testing a custom integration with a new app.
Want to use your integration in an existing app?
Copy the integration prompt and paste it into the chat of any app you want to connect it to.

Troubleshooting

Click a topic to troubleshoot.
Most API-powered integrations require some input to process requests, such as a text prompt. Make sure you’ve entered a prompt or other required input before sending the request to the integration.OpenAI example: For an image generator, a prompt like Generate an image of...
This usually means the API key or secret entered is incorrect, expired, or missing. Make sure you’ve copied the API key correctly and that it is still valid.OpenAI example: OpenAI keys start with sk-. Get a new key from platform.openai.com/account/api-keys if needed.
Make sure you clicked Save Integration and set the visibility to Public if you want it reviewed for the catalog. Private integrations only show in your workspace’s private catalog.
Some APIs have rate limits, temporary failures, or maintenance windows. Wait a few minutes and try again, or check the provider’s status page for any issues on their end.
Confirm the secret value, the endpoint URL, required headers, and request body. Check provider status and rate limits. Review responses in your backend function for error messages.

FAQs

Click on a question below to learn more about creating custom integrations in Base44.
Enter the real values per app in DashboardSecrets, or when prompted during app setup. The catalog never stores your secret values.
Yes. Add the secret to each app that uses the integration. You can reuse an existing value in the app or paste a new one.
Yes, you can update your custom integration at any time. Open it in the My Integrations tab to make any changes. For public integrations, updates may be reviewed again.Managing your custom integration in Base44.
Yes. Anyone in your workspace can use custom integrations in your private catalog once they have access to the app that uses it.
No. Keys are stored per app and accessed only by the backend function. They are not shown in the UI or client.
Yes, you can update your keys anytime in your app’s DashboardSecrets.
It stays in your private catalog. You can update the description, instructions, or code, and then resubmit for review.