API Key
Learn about SoleAPI API keys and the rules that apply to them.
What is an API Key?
An API Key is a credential provided by SoleAPI for calling its public API. You can create one after registering an account. SoleAPI API Keys begin with sk-sole-.
Create and delete keys from API Key Management.
Keep your API Key secure. If it is exposed, your account balance may be used without authorization. If you suspect that a key has been exposed, disable or delete it immediately from API Key Management.
Options and rules when creating an API Key
Name
Choose a name for the API Key so that you can identify and manage it later.
Scheduling groups
Scheduling groups determine which models the current API Key can call. If no scheduling group is selected, the key can call models from all upstream providers available on the platform by default. If groups are selected, availability is limited to those groups.
- Even when a model service is listed under a compatible protocol endpoint, it may still be unavailable because of the API Key's scheduling groups, model removal, or account permissions.
By default, leaving this option unselected allows the API Key to call models from all upstream providers available on the platform. See the Model Catalog.
Routing preference
SoleAPI provides several routing preferences:
- Smart routing (default): administrators mark high-quality sources by provider, and this preference prioritizes those sources.
- Lowest cost: prices can vary between upstream sources even for the same model. This preference prioritizes less expensive sources.
- Lowest latency: prioritizes sources with shorter measured response latency.
- Most stable: prioritizes sources with the highest recently measured request success rate.
Spending limit
The platform tracks spending for each API Key in Credits. You can set an individual spending limit for every key. Requests are rejected with HTTP 402 after the limit is reached.
A value of 0 means no limit.
Expiration time
You can set an expiration time for an API Key. The key is disabled automatically after it expires, which is useful for temporary integrations or third-party delivery.
Leave it blank to keep the key valid indefinitely.
IP allowlist
You can configure an IP allowlist for an API Key. Only requests from listed IP addresses may use that key; requests from other addresses are rejected with HTTP 403. If your device has a fixed IP address, this reduces the risk of unauthorized use after a key leak.
Leave it blank to allow requests from all IP addresses.
Enable or disable
Disable a key at any time without deleting its historical usage.