Public API

API documentation

Every Ryvion job produces a cryptographically signed receipt — proof of which model ran, on what hardware, in which jurisdiction. This page documents the buyer, gateway, audit, and operator APIs. Use the examples below or open the interactive explorer for the live schema.

Base URL
https://ryvion-hub.fly.dev
OpenAPI Version
3.0.3
Hub Version
d2a76a6

Quickstart

Submit jobs, run sovereign inference, or export a compliance audit package — all from your API key.

Marketplace job submission

curl -X POST https://ryvion-hub.fly.dev/api/v1/marketplace/jobs \\
  -H "Content-Type: application/json" \\
  -H "X-API-Key: BUYER_API_KEY" \\
  -d '{
    "kind": 1,
    "budget": 500,
    "max_price_per_unit": 1,
    "currency": "CAD",
    "strict_jurisdiction": "CA",
    "region": "st. john's",
    "estimated_tokens": 3200
  }'

OpenAI-compatible chat

curl https://ryvion-hub.fly.dev/v1/chat/completions \\
  -H "Content-Type: application/json" \\
  -H "Authorization: Bearer BUYER_JWT_OR_API_GATEWAY_TOKEN" \\
  -d '{
    "model": "phi-4",
    "messages": [
      {"role": "user", "content": "How do I route work to Canada-only nodes?"}
    ]
  }'

JavaScript / TypeScript

const response = await fetch("https://ryvion-hub.fly.dev/api/v1/marketplace/estimate", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "X-API-Key": process.env.RYVION_API_KEY,
  },
  body: JSON.stringify({
    kind: 1,
    strict_jurisdiction: "CA",
    region: "st. john's",
    estimated_tokens: 3200,
  }),
});

const estimate = await response.json();

Python

import requests

resp = requests.post(
    "https://ryvion-hub.fly.dev/v1/embeddings",
    headers={
        "Authorization": "Bearer BUYER_TOKEN",
        "Content-Type": "application/json",
    },
    json={
        "model": "nomic-embed-text",
        "input": ["Ryvion developer portal"],
    },
    timeout=30,
)
resp.raise_for_status()
print(resp.json())

Public surfaces

The API is organized across buyer, inference gateway, audit/verification, and operator endpoints.

Buyer API

Submit marketplace jobs, estimate cost, manage credits, and route inference to sovereign-verified nodes in any jurisdiction.

  • /api/v1/marketplace/estimate
  • /api/v1/marketplace/jobs
  • /api/v1/jobs/{job}/receipts
  • /api/v1/marketplace/sla

OpenAI-compatible gateway

Drop-in chat completion and embeddings for any tool that speaks OpenAI semantics. Supports sovereign routing via strict_jurisdiction.

  • /v1/models
  • /v1/chat/completions
  • /v1/embeddings

Audit & Verification

Export signed receipts for compliance periods, inspect RYV2 draft evidence graphs, and generate audit packages for regulated workflows.

  • GET /api/v1/audit/receipts — JSON or CSV export
  • GET /api/v1/job/receipts/{job} — per-job receipt
  • GET /api/v1/jobs/{job}/evidence — policy, routing, provenance, and receipt graph
  • GET /api/v1/jobs/{job}/evidence/bundle — downloadable verifier bundle
  • GET /api/v1/evidence — buyer evidence run list
  • from, to, format=csv query params
  • Verify offline at ryvion.ai/verify

Operator API

Register nodes, poll for assigned work, submit Ed25519-signed receipts, and manage Stripe Connect payout onboarding.

  • /api/v1/node/register
  • /api/v1/node/work
  • /api/v1/node/receipt
  • /api/v1/node/connect/status

Interactive API explorer

Use the built-in explorer to inspect schemas, authorize requests, and try the live endpoints directly against the current hub.