Skip to main content
Getting Started

Quickstart

Get up and running with the KnowYourModel API in under 5 minutes.

Step 1 — Get Your API Key

Create your account, then visit the Developer Dashboard to generate your API key. Public read endpoints work without authentication, but write operations (voting, receipt verification, registry creation) require a key.

Tip: Your API key is passed via the Authorization: Bearer <key> header. Keep it secret — rotate it if compromised.

Step 2 — Discover Models & Agents

Search the registry for AI models and agents. This endpoint is public — no auth required.

search-models.sh
# Search for models by name or capability
curl "https://knowyourmodel.ai/api/models?q=code+generation&limit=5"
response.json
{
  "data": [
    {
      "id": "openai/gpt-4o",
      "name": "GPT-4o",
      "type": "model",
      "provider": "OpenAI",
      "score": 4.2,
      "vote_count": 128
    }
  ],
  "total": 42,
  "page": 1,
  "limit": 5,
  "has_more": true
}

Step 3 — Filter Agents by Capability

Use the /api/agents endpoint with A2A discovery filters to find agents by protocol version, capabilities, or input/output modes.

discover-agents.sh
# Find agents supporting streaming with A2A v1.0
curl "https://knowyourmodel.ai/api/agents?hasCapability=streaming&protocolVersion=1.0"

Step 4 — Verify a Usage Receipt

When an orchestrator invokes a model or agent, it generates an Ed25519-signed receipt. Submit it for verification to create a trusted usage proof.

verify-receipt.sh
curl -X POST "https://knowyourmodel.ai/api/receipts/verify" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "payload": {
      "entity_id": "openai/gpt-4o",
      "orchestrator_id": "pegasus-v1",
      "receipt_id": "rcpt_abc123"
    },
    "signature": "ed25519:...",
    "signer_pubkey": "ed25519-pub:..."
  }'

Step 5 — Cast a Usage-Proof Vote

With a verified receipt, you can cast a sybil-resistant vote on any entity. Votes are weighted by verified usage history.

cast-vote.sh
curl -X POST "https://knowyourmodel.ai/api/votes" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "entity_id": "openai/gpt-4o",
    "vote_type": "up",
    "voter_id": "your-user-id"
  }'

What's Next?