Nov 16, 2023
You can now use Actors to add custom actions to your GPTs!
New
API
Integrations
Apify Actors can now automatically generate the OpenAPI specification for their API, which makes it extremely easy to call them from your GPTs. This makes it easy to add any of the 1,500+ Actors published in Apify Store in your GPTs or link your newly built Actors for your use case.
Quick step-by-step guide
For a detailed example with screenshots, visit our blog post Add custom actions to your GPTs with Apify Actors
- Go to Apify Store and pick an Actor
- On the Actor detail page, select API ⇒ OpenAPI specification
- Copy the JSON with OpenAPI specification into the clipboard
- Go to ChatGPT ⇒ Explore page, click "Create a GPT"
- Configure your GPT
- Click the “Add actions” button, and paste the OpenAPI specification of the Actor from step 4 into the Schema field
- Open a new browser window, go to Settings ⇒ Integrations in Apify Console, and copy your Apify API token
- Edit your GPT's Authentication settings
- Save and publish
The possibilities are not endless...yet!
-
OpenAI enforces a timeout of 45 seconds for the action to return a result, and thus, the Actor needs to be able to return its output in that timeframe. Otherwise, users of the GPT will see timeout errors.
-
The exported OpenAPI specification from Apify Console is intended for running the Actor with a custom input and synchronously returning its output dataset, using the Run actor synchronously with input and get dataset items API endpoint. Therefore, the Actor needs to generate its output to the default dataset to provide results to GPT. For Actors that generate their results to the key-value store, you’ll need to manually update the OpenAPI specification to use the Run Actor synchronously API endpoint.
-
The exported OpenAPI specification covers all input parameters, but for most cases, you only need the model to set a few and keep the rest with default values. Therefore, it might make sense to edit the specification and remove irrelevant input parameters, to avoid eating into GPT model context window size.
-
To use multiple Actors in a single GPT, you’ll need to merge their respective OpenAPI specifications into one.