Hawkeye Docs

API

Chat completions

POST /api/v1/chat/completions with a personal API key.

POST /api/v1/chat/completions takes a personal API key (Settings, then API keys) as Authorization: Bearer. The key needs the text scope. POST /v1/chat/completions is the in-agent proxy. It checks a different token and is not this API.

Request

curl -s https://hawkeye.brownhawke.engineering/api/v1/chat/completions \
  -H "Authorization: Bearer $HAWKEYE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"hawkeye","messages":[{"role":"user","content":"Summarise the open jobs."}]}'

Response

A non-streaming response is a chat completion object: object is chat.completion, and the choice finish_reason is stop. When the turn is still running as a job, the response can include X-Hawkeye-Job-Id, X-Hawkeye-Job-State, and X-Hawkeye-Job-Poll-Url.

GET /api/v1/models lists hawkeye and agent:<id> for agents this key may use. It needs the text scope.

Errors

This route uses an OpenAI-style error, not the partner {ok, error, code} envelope. 401 is authentication_error. 402 is insufficient_quota. 403 and 429 are permission_error. The partner code string is still included when the key check produced one, such as scope_denied or agent_denied.