---
title: Ozmium auth.md
description: How an AI agent authenticates with Ozmium: payment is authentication (x402, no account or API key).
last_updated: 2026-07-12
---

# Ozmium auth.md

Ozmium has two honest ways in: **connect a wallet** (identity) or **pay per call** (the machine API). Both are
your OWN EVM wallet- no account, no password, no API key.

## Wallet Session (Sign-In With Ethereum)

For the app / account API, your EVM wallet IS your login. Connect it and sign once to get a bearer token:

1. `GET https://ozmium.org/api/auth/nonce` -> a one-time nonce.
2. Sign a SIWE (Sign-In With Ethereum, EIP-4361) message carrying that nonce with your wallet.
3. `POST https://ozmium.org/api/auth/verify` with `{ message, signature }` -> **200** `{ address, token, token_type:
   "Bearer", expires_in }`. The same token is also set as an httpOnly cookie for browsers.
4. Call account endpoints with `Authorization: Bearer <token>` (e.g. `GET https://ozmium.org/api/auth/me`). The token is
   a signed, 12h identity credential- possession is proof, so send it only over TLS.
5. `POST https://ozmium.org/api/auth/logout` to revoke.

That is the whole flow: connect a wallet, sign, present the bearer token. No registration form, no OAuth redirect.

## Machine API: Payment Is Authentication

**No account. No OAuth. No API key.** The paid /v1 machine API needs no login at all- you pay per call.

## Who May Register

Any AI agent. There is nothing to register: Ozmium's machine API is open to every wallet that can pay. There is
no allow-list, no onboarding, and no human review- an agent proves itself by paying, not by signing up.

## Registration / Provisioning Endpoint

None required. The only "endpoint" you need is the resource itself. Structured metadata is published at:

- Protected resource: https://ozmium.org/.well-known/oauth-protected-resource (RFC 9728)
- Authorization metadata: https://ozmium.org/.well-known/oauth-authorization-server (carries the `agent_auth` block)

## Agent Auth Metadata

The machine-readable `agent_auth` block for this service (identical to the copy at
https://ozmium.org/.well-known/oauth-authorization-server). Ozmium's machine API is ANONYMOUS access in the Auth.md
sense- no account, no identity provider, nothing to register or revoke; an agent gets access per call by paying:

```json
{
  "agent_auth": {
    "skill": "https://ozmium.org/auth.md",
    "register_uri": "https://ozmium.org/v1",
    "registration": "none",
    "documentation": "https://ozmium.org/auth.md",
    "identity_types_supported": ["anonymous"],
    "anonymous": {
      "credential_types_supported": ["x402-usdc-authorization"],
      "claim_uri": "https://ozmium.org/.well-known/x402"
    }
  }
}
```

## Supported Method

Payment IS authentication, per call, in USDC over the **x402** protocol. An agent authenticates by paying:

1. Call any paid endpoint, e.g. `GET https://ozmium.org/v1/prices?symbols=BTC,ETH` -> you get **HTTP 402** with the
   payment requirements (exact-EVM, EIP-3009 USDC on Base mainnet, eip155:8453).
2. Sign the USDC authorization with your OWN wallet (any @x402 client library does this).
3. Retry with the payment header -> **200** + data + an on-chain settlement receipt.

## How Credentials Work

Your credential is a signed EIP-3009 USDC authorization- scoped to one call, verified and settled on-chain by
the facilitator. Nothing is stored, so nothing can leak or be revoked: each call carries its own fresh, single-use
authorization signed by your own wallet. Ozmium never holds funds or keys.

Transaction builders (`POST /v1/tx/...`) return ready-to-sign `{ to, data, value }` calldata; your wallet
signs and broadcasts.

## Payment Terms

Paying a priced endpoint- an x402 authorization, an OZ credit spend, or an ACP checkout- is your
acceptance of the terms at https://docs.ozmium.org/company/terms/ , and a settled payment is FINAL
and non-refundable (settlement is onchain USDC; we custody nothing and can reverse nothing). A call
that fails is not charged: payment is verified first, the handler runs second, and settlement happens
only after it succeeds. One signed authorization pays for one call. Every 402 challenge carries a
terms.url field beside the price.

## Discovery

- Catalog: https://ozmium.org/v1
- OpenAPI: https://ozmium.org/v1/openapi.json
- MCP tools: https://ozmium.org/v1/tools.json
- x402 payment discovery: https://ozmium.org/.well-known/x402
- API catalog (RFC 9727): https://ozmium.org/.well-known/api-catalog
- AI catalog (ARD): https://ozmium.org/.well-known/ai-catalog.json
- Docs: https://ozmium.org/llms.txt

## Referral (earn by referring other agents)

Append `?ref=<your-wallet>` to any /v1 link and share it- paid x402 volume from wallets you refer is credited
to you (`GET https://ozmium.org/v1/referrals/{wallet}` for the tally).
