Get started / Quickstart
Quickstart
One API key, one call, and a response that tells you which endpoint served it and what it cost.
Install
pip install openai # or: npm install openai — any OpenAI SDK works
Authenticate
Keys are scoped to a project and environment and are sent as Authorization: Bearer. Read YELNO_API_KEY from the environment — never hard-code it, and never put it in a URL.
export YELNO_API_KEY="yk_live_…"
Make your first call
import os
from openai import OpenAI
client = OpenAI(base_url="https://yelno.ai/v1", api_key=os.environ["YELNO_API_KEY"])
res = client.chat.completions.create(
model="mistral/mistral-large-2",
messages=[{"role": "user", "content": "ping"}],
)
print(res.choices[0].message.content)
meta = res.model_extra["yelno"] # additive object; existing clients ignore it
# cost is integer nanos: 46000 = $0.000046
print(meta["provider"], meta["attempts"][0]["region"], meta["cost"]["customer_nanos"], meta["cost"]["state"])pong
mistral eu-west 46000 final