API keys
Keys let your own code and the Sennoric CLI call Solan models through the OpenAI-compatible API. Requests made with a key are paid from your API balance.
Keys
A key is shown in full only once, when you create it. Revoke any key you no longer use.
Make your first request
The API is OpenAI-compatible: point any OpenAI client at https://api.sennoric.com/v1 and use your key.
# Chat completion with Fresco 1.4.2 $ curl https://api.sennoric.com/v1/chat/completions \ -H "Authorization: Bearer sennoric-sk-…" \ -H "Content-Type: application/json" \ -d '{"model":"fresco-1.4.2","messages":[{"role":"user","content":"Hello"}]}'
# pip install openai from openai import OpenAI client = OpenAI(api_key="sennoric-sk-…", base_url="https://api.sennoric.com/v1") resp = client.chat.completions.create( model="fresco-1.4.2", messages=[{"role": "user", "content": "Hello"}], ) print(resp.choices[0].message.content)
# In the Sennoric CLI › /sennoric-key sennoric-sk-… › /model fresco
Replace sennoric-sk-… with a key from above. Never put a key in code you share or publish.