Quickstart
Three steps: make a key, add credits, and send a request with the OpenAI or Anthropic SDK you already use.
Quickstart
- Get a key. Sign in and press Generate a key on the API page, or Get your key in Account, Billing, API. The key is shown once.
- Add credits. Add $5 or more on the API page. Your first deposit of $10 or more adds $5 free.
- Make a request. Replace
YOUR_GHOST_KEYbelow with your key.
curl:
curl https://api.thesapientdirective.com/v1/chat/completions \
-H "Authorization: Bearer YOUR_GHOST_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"ghost-x2","messages":[{"role":"user","content":"Hello"}]}'
Base URL and auth
- Base URL, OpenAI format:
https://api.thesapientdirective.com/v1 - Base URL, Anthropic format:
https://api.thesapientdirective.com - Auth header:
Authorization: Bearer YOUR_GHOST_KEY - Default model:
ghost-x2
The Anthropic endpoint also accepts the key as x-api-key. Keys start with ak_. Keep them private: anyone with your key spends your credits.