Anthropic and Responses

The same models answer in the Anthropic Messages format and the OpenAI Responses format.

Anthropic format

The same models answer on /v1/messages in the Anthropic Messages format, which is what Claude Code uses.

curl:

curl https://api.thesapientdirective.com/v1/messages \
  -H "x-api-key: YOUR_GHOST_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "Content-Type: application/json" \
  -d '{"model":"ghost-x1","max_tokens":256,"messages":[{"role":"user","content":"Hello"}]}'

Responses format

/v1/responses takes the OpenAI Responses format, which is what Codex uses. Point any Responses client at https://api.thesapientdirective.com/v1 with your key.

curl:

curl https://api.thesapientdirective.com/v1/responses \
  -H "Authorization: Bearer YOUR_GHOST_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"ghost-x2","input":"Hello"}'