External API consumption
Overview
Use a flow that executes any API and send the data to a agent or function.
External API Consumption
Consuming external APIs involves interacting with APIs provided by third-party services. This typically requires:
Authentication: Obtain and use API keys or tokens.
Requests: Send HTTP requests to API endpoints.
Responses: Handle responses, usually in JSON or XML format.
Error Handling: Manage errors and exceptions properly.
Rate Limiting: Respect limits set by the API provider to avoid being blocked.
Prompt Engineering
Known LLMs indexed API consumpition
Unknown or specific documentation API consumption
Usage
Leverage Base to easily design your API and prototype apps, UX, or screens. To experiment with different outcomes, set "cached
" to false
Using /base
with "cached
" is equivalent to direclty calling the function after is creation, all none neccesary params will be ignored.
POST
/base
Creates a new flow with one or more actions, installs dependencies, builds tests and executes the resulting code.
Actions can be agents, backend functions, or cloud functions.
Headers
Content-Type
application/json
Authorization
Bearer <token>
Body
name
string
Name of the flow to summarize the actions
prompt
string
The instructions for AgentBase to transform in to code
data
object
The data example or parameters for your function to work
schedule
string
The cron calendar for the function to run automatically
return
object
The data example of your expected return
model
string
The model to run for your prompt
errors
array
List or possible errors your function needs to catch
cached
boolean
It will use the last version of the function whenever is available to save time and tokens
Response
Body Example
Last updated
Was this helpful?