Skip to content

Developers

OpenAI-compatible. Two lines to switch.

Same SDK, same format, same code. Change base_url and api_key. Get verified inference with signed receipts.

API endpoints

5

Chat, images, audio, embeddings, and model listing.

Auth modes

2

Bearer token or X-API-Key header. OpenAI SDK compatible.

Available models

7

Phi-4, Llama 3.2, TinyLlama, SDXL Turbo, SDXL, Whisper.

Pricing

$0.06

Per 1M tokens. Images $0.03/ea. $10 free on signup.

Quickstart

Python, JavaScript, or curl

Use the official OpenAI SDK. No Ryvion-specific library needed.

Python

from openai import OpenAI

client = OpenAI(
    base_url="https://ryvion-hub.fly.dev/v1",
    api_key="YOUR_RYVION_API_KEY",
)

# Streaming chat completion
stream = client.chat.completions.create(
    model="phi-4",
    messages=[
        {"role": "system", "content": "You are a helpful assistant."},
        {"role": "user", "content": "Explain quantum computing in 3 sentences."},
    ],
    stream=True,
)

for chunk in stream:
    print(chunk.choices[0].delta.content or "", end="")

JavaScript / TypeScript

import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://ryvion-hub.fly.dev/v1",
  apiKey: "YOUR_RYVION_API_KEY",
});

const stream = await client.chat.completions.create({
  model: "phi-4",
  messages: [{ role: "user", content: "Hello!" }],
  stream: true,
});

for await (const chunk of stream) {
  process.stdout.write(chunk.choices[0]?.delta?.content || "");
}

curl

# Chat completion
curl https://ryvion-hub.fly.dev/v1/chat/completions \
  -H "Authorization: Bearer YOUR_RYVION_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "phi-4",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

# Image generation
curl https://ryvion-hub.fly.dev/v1/images/generations \
  -H "Authorization: Bearer YOUR_RYVION_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "sdxl-turbo",
    "prompt": "A futuristic city at sunset",
    "size": "1024x1024"
  }'

# Audio transcription
curl https://ryvion-hub.fly.dev/v1/audio/transcriptions \
  -H "Authorization: Bearer YOUR_RYVION_API_KEY" \
  -F file=@audio.mp3 \
  -F model=whisper-1

# Embeddings
curl https://ryvion-hub.fly.dev/v1/embeddings \
  -H "Authorization: Bearer YOUR_RYVION_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "all-MiniLM-L6-v2",
    "input": "The quick brown fox"
  }'

# List models
curl https://ryvion-hub.fly.dev/v1/models

API reference

Three endpoint groups

Inference gateway, account management, and network health.

Inference gateway

GET/v1/models
POST/v1/chat/completions
POST/v1/embeddings
POST/v1/images/generations
POST/v1/audio/transcriptions

Account & billing

GET/api/v1/auth/me
GET/api/v1/auth/api-keys
POST/api/v1/auth/api-keys
GET/api/v1/billing/balance
POST/api/v1/billing/purchase-credits

Network & health

GET/healthz
GET/ready
GET/api/v1/network/stats
GET/api/v1/marketplace/nodes

Why developers choose Ryvion

OpenAI compatibility with verification built in

Same DX you expect, plus signed receipts and jurisdiction routing.

OpenAI-compatible

Same /v1/chat/completions and /v1/embeddings endpoints. Use the OpenAI SDK with one line changed.

Streaming with node info

Real-time SSE streaming. See which node picked up your request, its GPU, location, and verification status.

Scoped API keys

Create API keys with buyer, read-only, or write-only scopes. Revoke anytime from the dashboard.

Signed receipts

Every response backed by a cryptographic receipt. Audit trail built into the protocol, not bolted on.

Getting started

Three steps

1Sign up and get an API key from the dashboard.

2Set base_url to https://ryvion-hub.fly.dev/v1 in your OpenAI client.

3Send requests. Every response includes a signed receipt.

Start now

Create an account, generate an API key, and start sending requests in under a minute.