Quickstart
Change the base URL and key in your OpenAI-compatible client. Keep your familiar request shape.
Explore guide ↗Change the base URL and key in your OpenAI-compatible client. Keep your familiar request shape.
Explore guide ↗Explore model selection, routing preferences and familiar response formats.
Explore guide ↗Read the supported funding assets, SOL settlement accounting and HTTP 402 payment flow.
Explore guide ↗Understand signed receipts, attestation evidence and the limits of the privacy trust model.
Explore guide ↗import OpenAI from "openai";
const client = new OpenAI({
baseURL: process.env.ANYROUTE_BASE_URL,
apiKey: process.env.ANYROUTE_API_KEY,
});
const response = await client.chat.completions.create({
model: "meta-llama/llama-3.3-70b-instruct",
messages: [
{ role: "user", content: "Hello, Anyroute." }
],
});
console.log(response);Examples only. API requests are not sent from this recreation. Keep secret API keys on your server.