Skip to content
Goatfied

CLI & API

API

Use the same models that power the IDE, in your own apps.

Base URL & auth

The API lives at https://api.goatfied.com. Authenticate with a bearer token for your account (it starts with gf_). Prefer the CLI for terminal and CI use; call the API directly when you need full control.

Chat

POST https://api.goatfied.com/v1/chat
Authorization: Bearer $GOATFIED_TOKEN
Content-Type: application/json

{
  "model_class": "aiarco-goat-1.0",
  "messages": [
    { "role": "user", "content": "explain this diff" }
  ],
  "context_chunks": []
}

The response is a server-sent event stream: each frame is data: {"delta": "…", "finish_reason": …} and the stream ends with data: [DONE]. Pass file or symbol text in context_chunks to ground the answer. Model classes match the picker in the editor — see Models & pricing.

Other endpoints

  • POST /v1/edit — apply a scoped inline edit to a file (the engine behind Composer).
  • POST /v1/agent — start an agent run with the tool loop (read, edit, run terminal, fetch); streams steps back.
  • POST /v1/tab/complete — a single Goat-Tab completion.
  • POST /v1/index/query — semantic search over an uploaded codebase index.

Rate limits

Limits scale with your plan; Enterprise is custom. See pricing and usage.

Next
Goatfied — The AI code editor