Your server
Other tools and the API
SwisserAI speaks the OpenAI API format, so most coding tools can use it with a base URL, an API key and a model name.
The three settings
SwisserAI speaks the same API format as OpenAI. Most coding tools, such as Cline, Roo Code, Kilo Code, Continue and Aider, have a provider called OpenAI Compatible or similar. Fill in three things:
Base URL
https://ai.swisser.dev/v1API key
Your key from account settings, starting withsws-ai_Model
swisserai-free, orswisserai-premiumwith a plan
We test with OpenCode, see Work on your server. Other tools follow the same pattern; the field names differ a little from tool to tool.
Model names
swisserai-freeWho can use it:Every accountContext:131,072 tokensLongest answer:8,192 tokensswisserai-premiumWho can use it:Accounts with a planContext:262,144 tokensLongest answer:65,536 tokens
Context is how much the model can see at once: your task, the files and the chat. If a tool asks for these limits, enter the numbers above.
What API requests cost
Requests with a key use the credits of the account that owns the key, at the same lower rate as the extension. They count toward the same balance as the website. Each key shows its own requests and tokens in the account settings.
Test your key
This lists the models your key can use. Replace the key, or set the environment variable first:
curl https://ai.swisser.dev/v1/models -H "Authorization: Bearer $SWISSERAI_API_KEY"A working key returns a list with swisserai-free and swisserai-premium. A wrong key returns Invalid API key format or Invalid API key. A first real request:
curl https://ai.swisser.dev/v1/chat/completions \
-H "Authorization: Bearer $SWISSERAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "swisserai-free", "messages": [{"role": "user", "content": "Write a FiveM command that prints hello."}]}'