The address depends on the protocol — this is the #1 place people get wrong:OpenAI-compatible — with /v1:
https://www.ruapi.ai/v1
Anthropic — without /v1 (the SDK appends /v1/messages itself):
https://www.ruapi.ai
The endpoint tables below show full paths from the domain root. Auth via the Authorization: Bearer sk-... header (x-api-key also works on /v1/messages).
For Anthropic, do not add /v1 to the base_url — an extra /v1 returns a 404.
from openai import OpenAIclient = OpenAI( api_key="sk-YOUR_KEY", base_url="https://www.ruapi.ai/v1",)response = client.chat.completions.create( model="claude-opus-4-8", # see the main site pricing page for available models messages=[ {"role": "system", "content": "You are a friendly assistant."}, {"role": "user", "content": "Hello! What can you do?"}, ], temperature=0.7,)print(response.choices[0].message.content)print(f"Tokens used: {response.usage.total_tokens}")
import OpenAI from "openai";const client = new OpenAI({ apiKey: "sk-YOUR_KEY", baseURL: "https://www.ruapi.ai/v1",});const response = await client.chat.completions.create({ model: "claude-opus-4-8", // see the main site pricing page for available models messages: [ { role: "user", content: "Explain quantum entanglement simply." }, ],});console.log(response.choices[0].message.content);
from anthropic import Anthropicclient = Anthropic( api_key="sk-YOUR_KEY", base_url="https://www.ruapi.ai",)response = client.messages.create( model="claude-opus-4-8", # see the main site pricing page for available models max_tokens=1024, system="You are a technical expert.", messages=[ {"role": "user", "content": "What is the CAP theorem?"}, ],)print(response.content[0].text)print(f"Used: input={response.usage.input_tokens}, output={response.usage.output_tokens}")