logo

Integrating APIs

Want your app to show live crypto prices or generate AI images?
With dev.fun, you can integrate any external API into your vibecoded app — all through plain prompts, to integrate external data into your app.

How It Works

When you describe a feature that needs data from an external source, simply mention it in your prompt.
The AI will:
  1. Create a custom backend function that connects to the API
  1. Process the API’s response
  1. Make it available for your app to use

Example Prompts

plain text
Call the OpenAI API using SECRET_KEY and generate an image using the user input as the description.
plain text
Fetch the latest $PUMP price from the Dexscreener API and show it on screen.

Handling API Keys Securely

Most APIs require a secret key for authentication — this proves you’re authorized and lets the service bill your account if needed.
With dev.fun, you can store and use API keys securely:
Image without caption
  1. Go to your app’s Configuration tab
  1. Add a new secret under Secret Keys (e.g., MY_SECRET_KEY)
  1. Include it in your prompt:
    1. plain text
      Create a function that calls https://dexscreener.com/solana/ using MY_SECRET_KEY and displays the price data.
  1. (Optional) Add relevant details from the API’s documentation for more accurate results
Devbase will handle:
  • Secure API calls
  • Parsing JSON responses
  • Updating your UI — all from one prompt

Where You Can Use API Calls

You can link API calls to:
  • Buttons
  • App load events
  • Conditions
  • Other functions
This makes your app dynamic, real-time, and connected to the outside world.

Summary – Using APIs with dev.fun

  • Securely call any external API
  • Store & manage API keys under Configuration → Secret Keys
  • Use plain prompts to build the API logic
  • Display API data anywhere in your app
  • No coding, manual authentication, or parsing required — just prompt the AI