Skip to content

Commit c36fc22

Browse files
authored
docs: add agentic payments docs (#1981)
Adds a page at `/platform/integrations/skyfire`. Dedicated to the documentation of agentic payments with Skyfire. Also mentions the `allowsAgenticUsers` parameter on API's `GET /store`. Based on [this Notion document](https://www.notion.so/apify/Agentic-Payments-User-documentation-284f39950a22808381d6f5a03c36e024). <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Adds Skyfire agentic payments documentation and updates Store Actors API with `allowsAgenticUsers` filter and `isWhiteListedForAgenticPayment` field. > > - **API (OpenAPI)** > - Add query parameter `allowsAgenticUsers` (boolean) to `GET /store` actors listing in `apify-api/openapi/paths/store/store.yaml`. > - Extend response examples with `isWhiteListedForAgenticPayment` on actor items. > - **Docs** > - New page `sources/platform/integrations/ai/skyfire.md` documenting agentic payments via Skyfire: > - MCP setup and configuration (including `?payment=skyfire` and optional `actors` preload). > - API usage with `skyfire-pay-id` header for Actor runs and data retrieval. > - Limitations and supported-actors filtering using `allowsAgenticUsers=true`. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 906522f. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
1 parent bc886a7 commit c36fc22

File tree

3 files changed

+219
-0
lines changed

3 files changed

+219
-0
lines changed

apify-api/openapi/paths/store/store.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,16 @@ get:
8585
- PRICE_PER_DATASET_ITEM
8686
- PAY_PER_EVENT
8787
example: '''FREE'''
88+
- name: allowsAgenticUsers
89+
in: query
90+
description: |
91+
If true, only return Actors that allow agentic users. If false, only
92+
return Actors that do not allow agentic users.
93+
style: form
94+
explode: true
95+
schema:
96+
type: boolean
97+
example: true
8898
responses:
8999
'200':
90100
description: ''
@@ -120,6 +130,7 @@ get:
120130
lastRunStartedAt: '2019-07-08T14:01:05.546Z'
121131
currentPricingInfo:
122132
pricingModel: FREE
133+
isWhiteListedForAgenticPayment: true
123134
- id: zdc3Pyhyz3m8vjDeM
124135
title: My Public Actor
125136
name: my-public-actor
@@ -143,6 +154,7 @@ get:
143154
lastRunStartedAt: '2019-07-08T14:01:05.546Z'
144155
currentPricingInfo:
145156
pricingModel: FREE
157+
isWhiteListedForAgenticPayment: false
146158
deprecated: false
147159
x-legacy-doc-urls:
148160
- https://docs.apify.com/api/v2#/reference/store/store-actors-collection/get-list-of-actors-in-store
Lines changed: 207 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,207 @@
1+
---
2+
title: Agentic payments with Skyfire
3+
sidebar_label: Skyfire
4+
description: Learn how to use agentic payments with Skyfire to enable AI agents to autonomously run Apify Actors.
5+
sidebar_position: 18
6+
slug: /integrations/skyfire
7+
---
8+
9+
import Tabs from '@theme/Tabs';
10+
import TabItem from '@theme/TabItem';
11+
12+
Agentic payments enable AI agents to autonomously run Apify Actors using third-party payment providers, without requiring traditional Apify user accounts. This allows agents to discover, execute, and pay for web scraping and automation tasks independently.
13+
14+
Apify supports agentic payments through _Skyfire_, a payment network specifically designed for AI agents.
15+
16+
:::warning Experimental feature
17+
18+
Keep in mind that agentic payments are an experimental feature and may undergo significant changes considering the rapid evolution of payment protocols and AI technologies.
19+
20+
:::
21+
22+
## What is Skyfire?
23+
24+
[Skyfire](https://skyfire.xyz/) is a payment network built specifically for AI agents, enabling autonomous transactions with digital wallets and spending controls. It provides the infrastructure necessary for agents to make payments on behalf of users, allowing autonomous AI-driven workflows.
25+
26+
With Skyfire integration, agents can discover available Apify Actors, execute scraping and automation tasks, and pay for services using pre-funded Skyfire tokens, all without human intervention.
27+
28+
## Using Skyfire with Apify MCP Server
29+
30+
The [Apify MCP server](https://docs.apify.com/platform/integrations/mcp) provides the simplest way for agents to access Apify's Actor library using Skyfire payments.
31+
32+
### Prerequisites
33+
34+
Before using agentic payments through MCP, you need:
35+
36+
1. _A Skyfire account_ with a funded wallet - [sign up at Skyfire](https://app.skyfire.xyz/)
37+
1. _An MCP client_ that supports multiple server connections, such as [OpenCode](https://opencode.ai/), [Claude Desktop](https://claude.com/download) with MCP support, or other compatible clients
38+
1. _Both MCP servers configured_: Skyfire's MCP server and Apify's MCP server
39+
40+
### Configuration
41+
42+
Configure your MCP client to connect to both the Skyfire and Apify MCP servers. When connecting to the Apify MCP server for agentic payments, you must include the `?payment=skyfire` query parameter in the server URL. This enables the agentic payment flow and informs the agent about payment requirements.
43+
44+
```text
45+
https://mcp.apify.com?payment=skyfire
46+
```
47+
48+
<Tabs>
49+
<TabItem value="OpenCode" label="OpenCode" >
50+
51+
If you're using [OpenCode](https://opencode.ai/), add this configuration to your `opencode.json` file (refer to [OpenCode configuration docs](https://opencode.ai/docs/config/) for file location on your system):
52+
53+
```json
54+
{
55+
"$schema": "https://opencode.ai/config.json",
56+
"mcp": {
57+
"skyfire": {
58+
"enabled": true,
59+
"type": "remote",
60+
"url": "https://mcp.skyfire.xyz/mcp",
61+
"headers": {
62+
"skyfire-api-key": "YOUR_SKYFIRE_API_KEY"
63+
}
64+
},
65+
"apify": {
66+
"enabled": true,
67+
"type": "remote",
68+
"url": "https://mcp.apify.com?payment=skyfire"
69+
}
70+
}
71+
}
72+
```
73+
74+
</TabItem>
75+
<TabItem value="Claude Desktop" label="Claude Desktop" >
76+
77+
If you're using [Claude Desktop](https://claude.com/download), add this configuration to your `claude_desktop_config.json` file (refer to [Claude Desktop configuration docs](https://modelcontextprotocol.io/docs/develop/connect-local-servers) for file location on your system) and restart the application:
78+
79+
```json
80+
{
81+
"mcpServers": {
82+
"skyfire": {
83+
"command": "npx",
84+
"args": [
85+
"mcp-remote",
86+
"https://mcp.skyfire.xyz/mcp",
87+
"--header",
88+
"skyfire-api-key: YOUR_SKYFIRE_API_KEY"
89+
]
90+
},
91+
"apify": {
92+
"command": "npx",
93+
"args": [
94+
"mcp-remote",
95+
"https://mcp.apify.com?payment=skyfire"
96+
]
97+
}
98+
},
99+
"isUsingBuiltInNodeForMcp": true
100+
}
101+
```
102+
103+
</TabItem>
104+
</Tabs>
105+
106+
Replace `YOUR_SKYFIRE_API_KEY` with Skyfire buyer API key, which you can obtain from your [Skyfire dashboard](https://app.skyfire.xyz/).
107+
108+
### How it works
109+
110+
When an agent uses the Apify MCP server with Skyfire payments, the workflow proceeds as follows:
111+
112+
1. The agent searches for suitable Actors using the search tools or works with pre-loaded Actors.
113+
1. When attempting to run an Actor, the agent recognizes the need for a Skyfire PAY token with a minimum of $5 and calls the Skyfire MCP server to create it.
114+
1. The agent calls the Actor tool with the payment token.
115+
1. The Apify platform validates the token and starts the Actor run.
116+
1. The Actor does the work and delivers results.
117+
1. When the run completes, the agent receives the Actor results and can retrieve additional data if needed.
118+
1. Finally, Apify's billing system charges the Skyfire PAY token for the actual usage cost.
119+
120+
Any unused funds remain available in the token for future runs or are returned to your Skyfire wallet when the token expires. This means you will not lose money if the actual usage is less than the $5 minimum.
121+
122+
![The flow](../images/skyfire-apify-agentic-flow.png)
123+
124+
### Pre-loading Actors
125+
126+
For more predictable workflows, you can pre-load specific Actors when connecting to the MCP server by adding them to the URL:
127+
128+
```text
129+
https://mcp.apify.com?payment=skyfire&tools=actor1,actor2,actor3
130+
```
131+
132+
Replace `actor1,actor2,actor3` with the actual Actor IDs you want to make available, such as `junglee/free-amazon-product-scraper,streamers/youtube-scraper`.
133+
See which Actors [support agentic payments](#supported-actors).
134+
135+
### Actor discovery
136+
137+
When not pre-loading Actors, agents can discover suitable Actors dynamically using the search tools. The search automatically filters results to show only Actors that support agentic payments.
138+
139+
## Using Skyfire with Apify API
140+
141+
For direct API integration, you can use Skyfire PAY tokens to authenticate and pay for Actor runs.
142+
143+
:::info Handled by MCP
144+
145+
The MCP client handles these operations automatically when using Skyfire PAY tokens.
146+
147+
:::
148+
149+
### Authentication
150+
151+
Instead of using a traditional Apify API token, pass your Skyfire PAY token in the request header:
152+
153+
```text
154+
skyfire-pay-id: YOUR_SKYFIRE_PAY_TOKEN
155+
```
156+
157+
### Running an Actor
158+
159+
Make a standard Actor run request to the [run Actor endpoint](https://docs.apify.com/api/v2#/reference/actors/run-collection/run-actor), but include the Skyfire PAY token in the header.
160+
161+
```bash title="Example of using the synchronous run endpoint"
162+
curl -X POST \
163+
'https://api.apify.com/v2/acts/ACTOR_ID/run-sync' \
164+
-H 'skyfire-pay-id: YOUR_SKYFIRE_PAY_TOKEN' \
165+
-H 'Content-Type: application/json' \
166+
-d '{
167+
"input": {
168+
"your": "input"
169+
}
170+
}'
171+
```
172+
173+
You can also use the asynchronous [run Actor endpoint](https://docs.apify.com/api/v2#/reference/actors/run-collection/run-actor) if you don't need to wait for results immediately.
174+
175+
### Retrieving results
176+
177+
After your Actor run completes, you can retrieve results using the [dataset endpoints](https://docs.apify.com/api/v2#/reference/datasets) or [key-value store endpoints](https://docs.apify.com/api/v2#/reference/key-value-stores). Include the same `skyfire-pay-id` header to authenticate these requests.
178+
179+
### Supported Actors
180+
181+
Not all Actors in the Apify Store can be run using agentic payments.
182+
183+
Apify maintains a curated list of Actors approved for agentic payments. To check if an Actor supports agentic payments, use the `allowsAgenticUsers=true` query parameter when [searching the store via API](https://docs.apify.com/api/v2#/reference/store/store-actors-collection/get-list-of-actors-in-store).
184+
185+
```text
186+
https://api.apify.com/v2/store?allowsAgenticUsers=true
187+
```
188+
189+
### Payment requirements
190+
191+
Your Skyfire PAY token must have at least _$5_ available to run Actors. However, you will only be charged for actual usage. If an Actor run costs less than 5$, the unused funds remain available in your token for future runs or return to your Skyfire wallet when the token expires.
192+
193+
### Unsupported features
194+
195+
The following operations are not supported with agentic payments:
196+
197+
- Schedule creation or management
198+
- Standby run initiation
199+
- Integration setup such as webhooks to external services
200+
- Actor resurrection after the payment token has been settled
201+
202+
## Resources
203+
204+
- **[Model Context Protocol documentation](https://docs.apify.com/platform/integrations/mcp)** - Complete guide to using the Apify MCP server
205+
- **[Skyfire documentation](https://skyfire.xyz/)** - Official Skyfire guides and API reference
206+
- **[Apify API reference](https://docs.apify.com/api/v2)** - Complete API documentation for direct integration
207+
- **[Actor permissions](https://docs.apify.com/platform/actors/development/permissions)** - Understanding Actor permission levels
919 KB
Loading

0 commit comments

Comments
 (0)