Drop-in examples
Ohm’s distribution channel is the OpenAI-compatible API. No new protocol.
Official OpenAI Python
from openai import OpenAI
client = OpenAI(base_url="https://api.withohm.dev/v1", api_key="sk-at-...")
TypeScript
import OpenAI from "openai";
const client = new OpenAI({
apiKey: "sk-at-...",
baseURL: "https://api.withohm.dev/v1",
});
curl
curl -s https://api.withohm.dev/v1/chat/completions \
-H "Authorization: Bearer sk-at-..." \
-H "Content-Type: application/json" \
-d '{"model":"gpt-4o-mini","messages":[{"role":"user","content":"hi"}]}'