You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: sources/platform/integrations/ai/mastra.md
+11-1Lines changed: 11 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,7 +31,7 @@ This guide demonstrates how to integrate Apify Actors with Mastra by building an
31
31
### Prerequisites
32
32
33
33
-_Apify API token_: To use Apify Actors, you need an Apify API token. Learn how to obtain it in the [Apify documentation](https://docs.apify.com/platform/integrations/api).
34
-
-_OpenAI API key_: To power the agents, you need an OpenAI API key. Get one from the [OpenAI platform](https://platform.openai.com/account/api-keys).
34
+
-_LLM provider API key_: To power the agents, you need an LLM provider API key. For example, get one from the [OpenAI](https://platform.openai.com/account/api-keys) or [Anthropic](https://console.anthropic.com/settings/keys).
35
35
-_Node.js_: Ensure you have Node.js installed.
36
36
-_Packages_: Install the following packages:
37
37
@@ -47,13 +47,17 @@ First, import all required packages:
47
47
import { Agent } from'@mastra/core/agent';
48
48
import { MastraMCPClient } from'@mastra/mcp';
49
49
import { openai } from'@ai-sdk/openai';
50
+
// For Anthropic use
51
+
// import { anthropic } from '@ai-sdk/anthropic';
50
52
```
51
53
52
54
Next, set the environment variables for the Apify API token and OpenAI API key:
0 commit comments