The Losi API allows you to integrate Losi's AI capabilities directly into your applications. Our API follows the OpenAI API format, making it easy to migrate existing applications or build new ones with our services.
All API requests require authentication using an API key. You can create and manage your API keys in your profile settings.
To authenticate, include your API key in the Authorization header of your requests:
To create a new API key, navigate to your Profile Settings and enable API access. Then select the API tab and create a new API key with a name and permissions.
POST /api/v1/chat/completions
Create a chat completion for the given messages.
Request
Response
Our API supports a variety of models including:
For a complete list of available models, use the GET /api/v1/models endpoint.
The losi-omega model is Losi's flagship AI model, built using a unique architecture called Unified Intelligence.
It offers enhanced reasoning capabilities and native support for tools/function calling.
When using losi-omega through the API, the model's core system prompt is automatically injected, ensuring it maintains its friendly, helpful personality and proper tool usage capabilities. If you provide your own system message, the losi-omega system prompt will be appended to it rather than replacing it.
Example request with losi-omega:
To receive a stream of partial completions, set stream: true. The response will be a stream of data in the Server-Sent Events format.
Function calling allows the model to generate function calls as part of its output. This is useful for parsing structured information from user queries or calling external tools.
GET /api/v1/models
Lists the models available for your account based on your subscription plan.
Response
GET /api/v1/api-keys
List all API keys for your account.
Response
POST /api/v1/api-keys
Create a new API key.
Request
Response
DELETE /api/v1/api-keys?id=key_abc123
Delete an API key by ID.
Response
GET /api/v1/api-usage?start_date=2023-06-01&end_date=2023-06-30
Get API usage statistics for a specific date range.
Response
API errors are returned with an appropriate HTTP status code and a JSON response body that includes an error object.
Common error types:
authentication_error - You provided an invalid API keypermission_error - Your API key does not have permission for this actioninvalid_request_error - Your request was malformed or missing required parametersrate_limit_error - You've exceeded your rate limitinsufficient_quota - You've exceeded your usage quota or lack access to the requested modelserver_error - An unexpected error occurred on our serversRate limits and quotas vary based on your subscription plan:
Usage is measured in tokens, where:
Since our API is compatible with the OpenAI format, you can use the OpenAI SDK for most languages:
For questions or issues with the API, please contact our support team at or visit our .