1 USD ≈ 27,000 credits · display only
Reference rate may change over time.
1 USD ≈ 27,000 credits · display only
Reference rate may change over time.
Coming to Gommo platform
POST /v1/chat/completions is a self-hosted gateway shim, not Gommo public API. For production today use POST https://api.gommo.net/api/v2/chat — see Chat reference. OpenAI-compatible routing will ship on Gommo.
Gommo Developer exposes POST /v1/chat/completions — map Gommo chat to the OpenAI Chat Completions API so tools like LangChain, OpenAI SDK, or custom agents can plug in without Gommo-specific payloads.
Same user token as all Gommo APIs:
Authorization: Bearer <user_access_token>Get a token via public login:
$domain = $env:GOMMO_API_DOMAIN; if (-not $domain) { throw 'Set GOMMO_API_DOMAIN to the user registration domain (dealer)' }
$body = "[email protected]&password=YOUR_PASSWORD&domain=$domain"
$login = Invoke-RestMethod -Method POST `
-Uri "https://api.gommo.net/api/apps/go-mmo/auth/login" `
-ContentType "application/x-www-form-urlencoded" -Body $body
$env:TOKEN = $login.access_tokenOr paste a token from /app/token/.
curl -X POST http://localhost:3001/v1/chat/completions \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5.5::cheap",
"messages": [
{ "role": "user", "content": "Hello!" }
]
}'| Field | Notes |
|---|---|
messages | Required. system / user / assistant roles supported |
model | Optional. Format model::server (Gommo) or omit for GOMMO_CHAT_MODEL default |
stream | true → SSE in OpenAI chunk format |
system messages are prepended to the user query for upstream compatibility.
Standard OpenAI shape:
{
"id": "chatcmpl-…",
"object": "chat.completion",
"choices": [{
"message": { "role": "assistant", "content": "…" },
"finish_reason": "stop"
}],
"usage": { "prompt_tokens": 0, "completion_tokens": 0, "total_tokens": 0 }
}Token usage is not reported by Gommo — fields are 0.
curl -N -X POST http://localhost:3001/v1/chat/completions \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"model":"gpt-5.5::cheap","stream":true,"messages":[{"role":"user","content":"Hi"}]}'Returns text/event-stream with chat.completion.chunk objects and final data: [DONE].
curl http://localhost:3001/v1/models \
-H "Authorization: Bearer $TOKEN"Returns the configured default chat model from env (GOMMO_CHAT_MODEL).
OpenAI-compatible /v1/chat/completions and JSON chat wrappers exist only when self-hosting this repo — Deploy → Self-host (advanced). Production: use direct Gommo form API above.