A simple REST API for text generation, streaming responses, chats, Gems, files, and research.
Open Swagger docsOpen ReDocBrowser loginStart the service, authenticate through the local browser page if needed, then call the API from your application. Authentication cookies are managed by the persisted browser session.
curl -X POST http://127.0.0.1:8432/generate \
-H 'Content-Type: application/json' \
-d '{"prompt":"Explain async Python in three sentences."}'
Generate a complete response from one prompt.
Receive newline-delimited JSON chunks as the response is generated.
Start a persistent chat and optionally send its first message.
Continue an existing chat conversation.
List models available to the authenticated account.
Check service and browser-client status.
import requests
response = requests.post(
"http://127.0.0.1:8432/generate",
json={"prompt": "Give me five names for a coffee shop."},
timeout=300,
)
response.raise_for_status()
print(response.json()["text"])
curl -X POST http://127.0.0.1:8432/chat/start/json \
-H 'Content-Type: application/json' \
-d '{"message":"You are a concise coding assistant."}'
curl -X POST http://127.0.0.1:8432/chat/CHAT_ID/message/json \
-H 'Content-Type: application/json' \
-d '{"message":"Explain dependency injection."}'
Streaming endpoints return application/x-ndjson. Read one JSON object per line.
curl -N -X POST http://127.0.0.1:8432/generate/stream \
-H 'Content-Type: application/json' \
-d '{"prompt":"Write a short poem about APIs."}'
Keep this service bound to localhost or protect it with TLS and authentication before exposing it to a network. Do not expose browser or API credentials.