Skip to content

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

  1. Navigate to API Keys in the sidebar
  2. Click Create API Key
  3. Enter a name (e.g., “Production App”)
  4. Select scopes (chat, conversations, audio)
  5. Copy the key immediately — it’s shown only once

API Key Format

Keys start with sk-gm- followed by a random string:

sk-gm-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Scopes

ScopeDescription
chatChat completions and streaming
conversationsConversation management
audioAudio 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

Terminal window
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