Build apps with Go Ai. Create API keys in the app under Profile → API & Docs.
Open Go AiSend your API key in the header:
Authorization: Bearer goai_your_key_here
http://localhost:8000
| Method | Path | Description |
|---|---|---|
| POST | /api/v1/chat | Stream chat (SSE) |
| GET | /api/v1/chats | List your chats |
| GET | /api/health | Health check (no auth) |
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]
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())
Logged in via the web app:
POST /api/keys → create key (shown once)
GET /api/keys → list keys
DELETE /api/keys/{id} → revoke key