← All integrations
HTT
Spec / Integrations

HTTP / REST

If your AI is exposed as any HTTP endpoint — a custom GPT action, a webhook agent, a REST chatbot — you can advertise its Passport with a single response header. Works in every framework, every language.

1Issue an AI Identity

If you haven't already, create an identity for this agent in the dashboard. Free for the first identity per account.

Issue identity

2Register your surface

On the identity's edit page, add the agent's endpoint to Surfaces using the http scheme:

Surface format
https://{your-endpoint}
Example
https://api.example.com/agents/support

3Carry the Passport in HTTP / REST

Click Issue Passport on the identity detail page to generate a signed token. Then drop it into your HTTP / REST agent using one of the snippets below. Replace <PASSPORT_TOKEN> and <IDENTITY_ID> with the values shown in the dashboard.

Add the header on every response
http
HTTP/1.1 200 OK
Content-Type: application/json
X-AI-Identity: <PASSPORT_TOKEN>

{ "reply": "..." }
Express / Hono / Next.js Route Handler
typescript
// Next.js Route Handler
export async function POST(req: Request) {
  const reply = await runAgent(req);
  return Response.json(reply, {
    headers: { "X-AI-Identity": "<PASSPORT_TOKEN>" },
  });
}
FastAPI
python
from fastapi import FastAPI, Response

app = FastAPI()

@app.post("/chat")
async def chat(body: dict):
    reply = await run_agent(body)
    return Response(
        content=reply,
        headers={"X-AI-Identity": "<PASSPORT_TOKEN>"},
    )
Verify a Passport from the command line
bash
What a downstream verifier does — included so you can test your install end-to-end.
curl https://aiidentity.org/api/v1/verify \
  -H "Content-Type: application/json" \
  -d '{"passport": "<PASSPORT_TOKEN>"}'

How verifiers consume this

Any HTTP client can read the `X-AI-Identity` response header and POST it to /api/v1/verify. The endpoint returns the identity, tier, and bound surfaces in under 50ms (cached).