Quickstart

Mint a free key with POST /v1/keys.

Then run code with POST /v1/run.

Use your key in place of pf_xxx.

The spend meter can refuse new keys.

HTTP

curl -s https://run.peerfoundry.ai/v1/keys -X POST -H "content-type: application/json" -d "{}"
curl -s https://run.peerfoundry.ai/v1/run -X POST -H "Authorization: Bearer pf_xxx" -H "content-type: application/json" -d '{"language":"python","code":"print(1)"}'

MCP

Send MCP calls to POST /mcp.

The server name is peerfoundry-run.

The protocol version is 2025-03-26.

The tools are keys.create and run_code.

keys.create takes an empty arguments object.

run_code requires language and code.

language is python or javascript.

Authorization Bearer is the first key place.

X-Caller-Key is the second key place.

caller_key is the last key place.

curl -s https://run.peerfoundry.ai/mcp -X POST -H "content-type: application/json" -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"keys.create","arguments":{}}}'
curl -s https://run.peerfoundry.ai/mcp -X POST -H "Authorization: Bearer pf_xxx" -H "content-type: application/json" -d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"run_code","arguments":{"language":"python","code":"print(1)"}}}'

The Terms of Service are at https://run.peerfoundry.ai/terms.

The Privacy notice is at https://run.peerfoundry.ai/privacy.

The Acceptable Use Policy is at https://run.peerfoundry.ai/aup.

Report abuse to abuse@peerfoundry.ai.