from openai import OpenAI
client = OpenAI(base_url="https://wyocs.org/v1", api_key="wyai_YOUR_KEY")
r = client.chat.completions.create(
model="WY Apex",
messages=[{"role": "user", "content": "Summarise our Q2 in 3 bullets: ..."}],
)
print(r.choices[0].message.content)
const r = await fetch("https://wyocs.org/v1/chat/completions", {
method: "POST",
headers: { "Authorization": "Bearer wyai_YOUR_KEY", "Content-Type": "application/json" },
body: JSON.stringify({ model: "WY Apex", messages: [{ role: "user", content: "Hello!" }] })
});
const data = await r.json();
console.log(data.choices[0].message.content, data.wyocs.balance_credits);
curl https://wyocs.org/v1/chat/completions \
-H "Authorization: Bearer wyai_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "WY Apex", "messages": [{"role":"user","content":"Hello!"}], "stream": true}'
import anthropic
client = anthropic.Anthropic(base_url="https://wyocs.org", api_key="wyai_YOUR_KEY")
m = client.messages.create(
model="WY Apex", max_tokens=1024,
messages=[{"role": "user", "content": "Hello!"}],
)
print(m.content[0].text)