Go Ai API

Build apps with Go Ai. Create API keys in the app under Profile → API & Docs.

Open Go Ai

Authentication

Send your API key in the header:

Authorization: Bearer goai_your_key_here

Base URL

http://localhost:8000

Endpoints

MethodPathDescription
POST/api/v1/chatStream chat (SSE)
GET/api/v1/chatsList your chats
GET/api/healthHealth check (no auth)

Chat (streaming)

POST /api/v1/chat
Content-Type: application/json
Authorization: Bearer goai_...

{
  "messages": [
    { "role": "user", "content": "Hello Go Ai" }
  ]
}

Response is Server-Sent Events: data: {"content":"..."} then data: [DONE]

Python example

import requests

API_KEY = "goai_your_key"
url = "BASE/api/v1/chat"
headers = {"Authorization": f"Bearer {API_KEY}", "Content-Type": "application/json"}
data = {"messages": [{"role": "user", "content": "Hi"}]}

with requests.post(url, json=data, headers=headers, stream=True) as r:
    for line in r.iter_lines():
        if line and line.startswith(b"data: "):
            print(line.decode())

Manage keys (browser session)

Logged in via the web app:

POST /api/keys        → create key (shown once)
GET  /api/keys        → list keys
DELETE /api/keys/{id} → revoke key

Interactive docs

FastAPI auto-docs: /docs · /redoc