No-code applications
This guide explains the Applications endpoint, which generates content from deployed no-code applications with inputs.
The Applications API allows you to turn deployed no-code applications into microservices, which can also be used as tools in tool calling. Business users can define inputs, prompts, and outputs, and developers can then add them to other applications, UIs, or services.
Your API key can be generated using these steps.
Overview
The /applications
endpoint generates content based on inputs provided to a specific no-code application created in AI Studio. When calling the endpoint, you’ll need:
- The
application_id
of your deployed application, which is the unique identifier of a no-code application in AI Studio - Input values matching the application’s defined input fields
- For file inputs, a
file_id
from the Files API
Using the /applications
endpoint will result in charges for model usage. See the pricing page for more information.
Text generation applications
Text generation applications generate content based on the inputs provided to a specific no-code application created in AI Studio. This is a great way to enable business users to control prompts and outputs while still allowing developers to add them to other applications, UIs, or services.
Request format
For text generation applications, the request body will have the following format:
Example request
Here’s an example of how to call the /applications
endpoint using cURL and the Writer Python and Node SDKs:
Response format
Text generation applications return a JSON response with the following format:
Research assistant applications
Research assistant applications output a final report after performing research in stages. Because of this, they support streaming responses.
Request format
Research assistant applications have similar request formats to text generation applications, but include a stream
field:
Note that these applications will always include an input with the id
of query
to capture the user’s query.
Example request
Streaming response format
Each streamed chunk contains:
Using applications with tool calling
You can use deployed no-code applications as tools in your tool calling implementation. This allows you to combine the power of no-code applications with other tools and APIs. See the applications tool calling guide for implementation details.
Implementation steps
Create your application
Build a text generation or research assistant application in AI Studio.
Deploy the application
Deploy your application to get an application ID.
Get the code snippet
Use the “View code” button in AI Studio to get a starter code snippet.
Copy code snippet
Copy the displayed code snippet. You can choose between cURL, Python, or JavaScript.
Implement error handling
Handle potential errors and respect rate limits.
For more details on building applications, see the AI Studio No-code documentation.