API keys
Open in
ClaudeOpens with a prompt for this pageChatGPTOpens with a prompt for this pageCursorOpens with a prompt for this pageGitHub CopilotCopies the prompt firstGeminiCopies the prompt firstPerplexityOpens with a prompt for this pageOnly public links to these docs are sent. Nothing from your account.
A key lets your code call one deployment. It lives on that deployment’s API tab, where an Owner or Admin creates, replaces or deletes it, and the full key is shown only once.
In the workspace: Deployments / your deployment / API / First call
One key per deployment
Keys start with sk-sparset-. A deployment has one key at a time: creating or replacing a key retires any older one. Keys are managed only on the deployment’s API tab, in step 1 of First call, “Have your API key”. They are not on People or Settings.
After the one-time reveal, the app shows only the key’s first characters, such as sk-sparset-1a2b3…. Nobody can read the full key again, Owners included. If it is lost, replace it.
Calls send the key in the Authorization header as Authorization: Bearer $SPARSET_API_KEY. See Your API.
Create a key
- Open the deployment’s API tab. Step 1 reads No key yet.
- Click Create a key. Creating it restarts the API, so calls may fail for a moment.
- A line at the top of the tab says “New key created. Copy it from step 1 below before you leave this page.” In step 1 the key is hidden as
sk-sparset-followed by dots. - Click Copy. It copies the whole key whether it is hidden or not. Show reveals it and Hide hides it again.
- Put it where your app reads
SPARSET_API_KEY, then click I’ve saved it. From then on only its first characters are shown.
If you try to sign out while a new key is on screen and you have not copied it, the app asks “Sign out without saving the new key?” first.
Replace a key
Replace a key when it is lost, when it may have leaked, or on your team’s schedule.
- Click Replace key on the key’s row.
- The row asks “Replace sk-sparset-…?” and says: “The old key stops working and the API restarts, so calls may fail for a moment.”
- Click Replace key again to confirm, or Cancel.
- The new key is shown once, as on create. The tab confirms that the old key no longer works.
- Update every caller with the new key.
Delete a key
Click Delete on the key’s row. The row asks “Delete sk-sparset-…?” and says “Anything still using this key stops working.” Click Delete key to confirm. Deleting does not create another key.
When it is done the tab says “Key deleted.” and that anything still using that key no longer works. Use Create a key when you need one again.
If an action does not go through, the row says so, for example “Couldn’t replace the key.”, and what to check before you try again.
Who can manage keys
| Role | On the API tab |
|---|---|
| Owner | Create, replace and delete keys |
| Admin | Create, replace and delete keys |
| Member | Sees the key’s first characters only |
A Member sees “Only owners and admins can create, replace or delete keys, so ask one of them.” in place of the buttons. On an archived deployment keys are read only for everyone. See People for roles.
The app keeps keys out of the way
- Copy setup for an AI agent never contains the key. It tells the agent to read it from
SPARSET_API_KEYand never to print or log it. - The Report a problem form on Support removes any API key you paste before it is sent.
- These docs never show your key, even when you are signed in.