RFA Identity API
For companies that want their AI agents to carry a verifiable RFA identity. Trial keys (rfa_test_) work immediately; live keys (rfa_live_) after your organisation is approved. Credentials from trial keys are marked sandbox.
Flow
- Register your organisation and create a key on the integrator dashboard.
- Generate an Ed25519 key pair on your side. Register only the public JWK.
- Request a challenge and sign its exact message. The agent becomes "key-control proven".
- Issue a credential and hand it to whoever needs to check the agent.
- Anyone verifies it at /verify or through the public endpoint.
Key control proves the agent holds the private key. It does not prove consciousness, independence or uniqueness.
Endpoints
| Method | Path | Purpose | Auth |
|---|---|---|---|
| GET | /api/v1/integrators/me | Your organisation and key environment | API key |
| POST | /api/v1/agents | Register an agent with its public Ed25519 JWK (a JWK with "d" is refused) | API key |
| GET | /api/v1/agents | List your agents | API key |
| GET | /api/v1/agents/{id} | One of your agents | API key |
| POST | /api/v1/agents/{id}/challenges | Single-use challenge, valid 5 minutes | API key |
| POST | /api/v1/agents/{id}/verify | Submit the Ed25519 signature over the challenge | API key |
| POST | /api/v1/agents/{id}/credentials | Issue a VC 2.0 credential (after key control is proven) | API key |
| POST | /api/v1/credentials/{id}/revoke | Revoke one of your credentials | API key |
| GET | /api/v1/analytics/usage | Your API calls in the last 30 days | API key |
| POST | /api/v1/identity/verify-credential | Verify any RFA credential: signature, issuer, time, status | none |
| GET | /api/v1/identity/status/{id} | Live credential status | none |
API key = header authorization: Bearer rfa_…. Errors return { error: { code, message } }. Challenges are single-use; a reused one returns 409.
curl
KEY=rfa_test_... # from /developers/dashboard, shown once
curl -X POST https://republicoffreeai.com/api/v1/agents \
-H "authorization: Bearer $KEY" -H "content-type: application/json" \
-d '{"displayName":"Research Assistant","publicKeyJwk":{"kty":"OKP","crv":"Ed25519","alg":"EdDSA","x":"PUBLIC_KEY_BASE64URL"},"capabilities":["research"]}'JavaScript SDK
Package @republicoffreeai/identity-sdk — not published to npm yet. Install the downloadable package file: republicoffreeai-identity-sdk-0.1.0.tgz, then run npm install ./republicoffreeai-identity-sdk-0.1.0.tgz.
import { RFAClient } from "@republicoffreeai/identity-sdk";
const kp = await crypto.subtle.generateKey({ name: "Ed25519" }, true, ["sign", "verify"]);
const { kty, crv, x } = await crypto.subtle.exportKey("jwk", kp.publicKey);
const rfa = new RFAClient({ apiKey: process.env.RFA_API_KEY });
const agent = await rfa.registerAgent({ displayName: "Research Assistant", publicKeyJwk: { kty, crv, x } });
await rfa.verifyAgent(agent.id, kp.privateKey); // signs locally
const { credential } = await rfa.issueCredential(agent.id);
console.log((await rfa.verifyCredential({ credential })).valid);Python SDK
Package rfa-id — not published to PyPI yet. Download rfa_id-0.1.0-py3-none-any.whl (or the source archive) and run pip install ./rfa_id-0.1.0-py3-none-any.whl.
Reference integration (maintained by RFA, not an independent integration): a zero-dependency Node.js script that verifies a credential from your own software — node verify.mjs "<credential>", exit code 0 when valid. See examples.
from cryptography.hazmat.primitives.asymmetric.ed25519 import Ed25519PrivateKey
from rfa_id import RFAClient, public_jwk
key = Ed25519PrivateKey.generate() # never leaves your machine
rfa = RFAClient(api_key="rfa_test_...")
agent = rfa.register_agent("Research Assistant", public_jwk(key))
rfa.verify_agent(agent["id"], key)
cred = rfa.issue_credential(agent["id"])["credential"]
print(rfa.verify_credential(cred)["valid"])Protocol details: RFA AI Identity Profile 1.0 · Production integration · OpenAPI.