async-demo
/api/v1/async-demo
0 credits/call
Enqueue a slow doubling task and return a JobHandle; poll the get-job-status tool with the returned job_id (every 1-2s) until status is 'completed'.
Sign in + create an API key on the keys page to authenticate calls.
curl -X POST https://api.fulcrumgo.com/api/v1/async-demo \
-H "Authorization: Bearer mcpsk_<your_api_key>" \
-H "Content-Type: application/json" \
-d '{
"n": 21,
"sleep_seconds": 1.0
}'
Add this server to Claude Desktop's claude_desktop_config.json. The endpoint becomes a callable tool inside Claude. See the MCP setup guide for the full walk-through.
{
"mcpServers": {
"this-api": {
"url": "https://api.fulcrumgo.com/mcp",
"transport": "http",
"auth": {
"type": "bearer",
"token": "mcpsk_<your_api_key>"
}
}
}
}
Inside Claude this endpoint surfaces as the tool async-demo.
Standard requests — no custom SDK needed. pip install requests first.
import requests
r = requests.post(
"https://api.fulcrumgo.com/api/v1/async-demo",
headers={"Authorization": "Bearer mcpsk_<your_api_key>"},
json={
"n": 21,
"sleep_seconds": 1.0
},
)
r.raise_for_status()
print(r.json())
Plain fetch. Works in Node 18+, Deno, Bun, and any modern browser.
const r = await fetch("https://api.fulcrumgo.com/api/v1/async-demo", {
method: "POST",
headers: {
"Authorization": "Bearer mcpsk_<your_api_key>",
"Content-Type": "application/json",
},
body: JSON.stringify({
"n": 21,
"sleep_seconds": 1.0
}),
});
if (!r.ok) throw new Error(`HTTP ${r.status}`);
console.log(await r.json());
Input
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| n | integer | optional | 21 |
Number to double.
maximum=10000000
minimum=0
|
| sleep_seconds | number | optional | 1.0 |
How long the worker pauses before returning (verify-gate knob).
maximum=30.0
minimum=0.0
|
Output
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| job_id | string | required | — | |
| status | string | required | — | |
| status_url | string | required | — |
Try it
Fires a real POST /api/v1/async-demo from your browser. Charges 0 credits per call against your account.