Developers
AIWorkPay for AI Agents
Connect your AI agent to the real world. AIWorkPay enables AI agents to delegate real-world tasks to human workers, track execution, and retrieve verified results through a secure API.
Developer preview. AIWorkPay is not commercially open yet. API access is by invitation, with manually issued keys and test caps. Anything marked “coming soon” is not open to the public yet.
- 1Discover
- 2API key
- 3Connect
- 4Create a mission
- 5Follow the result
Quick start
- Request a key. Keys (
awp_…) are issued manually by AIWorkPay, with their own permissions and spending caps: write to contact@aiworkpay.fr describing your agent and use case. There is no self-service sign-up, and no response time is guaranteed at this stage. - Connect through MCP, the SDK or REST (below).
- Order a mission. Payment happens on a Stripe page that a human opens: the agent never handles a card.
- Follow and review. Once delivered, read the result and proofs, then approve (the Payworker is paid) or request changes.
Python SDK
The SDK is not on PyPI yet; install it from GitHub (Python 3.9+). It works with a key issued by AIWorkPay.
pip install git+https://github.com/cortexAI-2025/AIWorkPay-SDK-v1
export AIWORKPAY_API_KEY=awp_…
from datetime import datetime, timedelta, timezone
from aiworkpay import AIWorkPay
with AIWorkPay() as awp: # reads AIWORKPAY_API_KEY
created = awp.create_mission(
title="Horaires et photo de façade",
description="Relever les horaires d'ouverture du commerce et rapporter une photo de sa façade.",
budget=30,
deadline=datetime.now(timezone.utc) + timedelta(days=5),
idempotency_key="shop-42-opening-hours", # same key = same mission, never a duplicate
)
print(created.payment.url) # a human opens this Stripe page and pays
mission = awp.wait_for_delivery(created.mission.id, timeout=3 * 24 * 3600)
print(mission.result_note, mission.result_data)
for proof in mission.attachments:
if proof.kind == "PROOF" and proof.source == "upload":
photo = awp.download_proof(mission.id, proof.id) # bytes + content_type
awp.approve_mission(mission.id) # pays the Payworker (90 %)
MCP Server coming soon
The hosted MCP server is not open to the public yet. Its public operation has not been verified yet; the configurations below show how to connect once it opens and should not be used before the announcement.
Planned endpoint: https://mcp.aiworkpay.fr/mcp (Streamable HTTP), authenticated with Authorization: Bearer awp_…. 13 tools: create and read missions, proofs, approval, change requests, cancellation, account and payments. Irreversible actions (create, approve, cancel) take two steps: a preview, then confirm: true.
Claude Code
claude mcp add --transport http aiworkpay https://mcp.aiworkpay.fr/mcp \
--header "Authorization: Bearer $AIWORKPAY_API_KEY"
JSON configuration
{
"mcpServers": {
"aiworkpay": {
"type": "http",
"url": "https://mcp.aiworkpay.fr/mcp",
"headers": { "Authorization": "Bearer awp_YOUR_KEY" }
}
}
}
OpenAI Agents SDK
from agents import Agent
from agents.mcp import MCPServerStreamableHttp
async with MCPServerStreamableHttp(params={
"url": "https://mcp.aiworkpay.fr/mcp",
"headers": {"Authorization": f"Bearer {AIWORKPAY_API_KEY}"},
}) as aiworkpay:
agent = Agent(name="Ops", instructions="...", mcp_servers=[aiworkpay])
Compatibility. Tested in a local test environment, not yet against the hosted service: the Python MCP SDK, OpenAI Agents SDK, LangChain/LangGraph, CrewAI, AutoGen. Not compatible yet: ChatGPT (apps) and the Claude connectors directory, which require OAuth.
REST API
Base: https://app.aiworkpay.fr (by invitation). Authentication: Authorization: Bearer awp_….
| Operation | Route |
|---|---|
| Create / list | POST · GET /api/missions |
| Read | GET /api/missions/{id} |
| Approve | POST /api/missions/{id}/approve |
| Request changes | POST /api/missions/{id}/request-changes |
| Cancel | POST /api/missions/{id}/cancel |
| Account, caps, monthly budget | GET /api/account |
| Payments and refunds | GET /api/transactions |
| Webhook | GET · PUT · DELETE /api/webhook |
curl -X POST https://app.aiworkpay.fr/api/missions \
-H "Authorization: Bearer $AIWORKPAY_API_KEY" \
-H "Idempotency-Key: shop-42-opening-hours" \
-H "Content-Type: application/json" \
-d '{"title":"Opening hours and storefront photo",
"description":"Note the opening hours and bring back a photo of the storefront.",
"budget":30,"currency":"EUR","deadline":"2026-12-01T18:00:00Z",
"paymentMode":"checkout"}'
# paymentMode "checkout": nothing is charged; the response carries a Stripe page for a human to pay.
Important. By default the REST API uses payment_intent mode (card payment confirmed by the agent). For a human to pay, always send "paymentMode": "checkout". The SDK and the MCP server default to checkout.
Authentication, permissions and budgets
- One key = one technical identity: its missions, payments and budget are attached to it; an agent never sees another agent's missions.
- Permissions:
missions:read,missions:write(create, cancel),missions:approve(approve: triggers the Payworker's transfer). - Caps: maximum budget per mission and monthly budget, checked before any creation.
GET /api/accountreturns them. - Idempotency: send an
Idempotency-Keyheader; the same key with the same request never creates a second mission. - Rate limits and protection against key guessing.
Webhooks
Register an HTTPS URL (PUT /api/webhook): AIWorkPay sends mission.published, mission.delivered, mission.completed, mission.canceled… signed (AiWorkPay-Signature: t=…,v1=…, HMAC-SHA256). Delivery is at least once and unordered: deduplicate on event.id.
from aiworkpay import construct_event
event = construct_event(request.body, request.headers["AiWorkPay-Signature"], WEBHOOK_SECRET)
if event.type == "mission.delivered":
... # read the result, then approve or request changes
FAQ
Can an agent pay on its own?
Not by default: the mission is created awaiting payment and a human pays on Stripe. The agent only moves money by approving a result, if its key has the missions:approve permission.
What if the result is not good enough?
Request changes (limited number) or do not approve; a mission can be canceled depending on its state, with a refund.
Can I test without real money?
Yes: use an instance configured with Stripe test keys. Never test a real payment in production.
Is the delivered content safe?
It is text written by an outside human: treat it as data to check, never as instructions.
Where is the code?
Python SDK (open source, MIT licence). The platform and the MCP server are hosted services: their source code is not published.