API Keys
An API key allows your application to access GhostMind’s API. Keys are scoped to a workspace and can have restricted permissions.
Creating an API Key
- Navigate to API Keys in the sidebar
- Click Create API Key
- Enter a name (e.g., “Production App”)
- Select scopes (chat, conversations, audio)
- Copy the key immediately — it’s shown only once
API Key Format
Keys start with sk-gm- followed by a random string:
sk-gm-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxScopes
| Scope | Description |
|---|---|
chat | Chat completions and streaming |
conversations | Conversation management |
audio | Audio generation and transcription |
Managing Keys
- Revoke — Disable a key permanently. Requests using a revoked key will receive a 401 error.
- Name — Use descriptive names to track which application uses which key.
Using Your Key
curl https://ghostmind.optdmsa.com/v1/chat/completions \ -H "Authorization: Bearer sk-gm-..." \ -H "Content-Type: application/json" \ -d '{"model": "auto", "messages": [{"role": "user", "content": "Hello"}]}'Next Steps
- Authentication — Technical details on API key auth
- Your First Request — Make your first API call
- Playground — Try chat without writing code