Base URL
The Gambiarra hub exposes an OpenAI-compatible HTTP API. The base URL depends on your hub configuration:- Hostname:
0.0.0.0(listens on all interfaces) - Port:
3000 - Example:
http://localhost:3000
Authentication
The hub currently does no authentication at the HTTP level. It is designed for trusted local networks. Room-level protection:- Rooms can optionally be password-protected
- Password is required when joining a protected room via
POST /rooms/:code/join - Passwords are hashed using argon2id before storage
Common Headers
Request Headers
Content-Type: application/json header.
Response Headers
All responses include:CORS Support
The hub supports CORS with the following configuration: Preflight requests (OPTIONS):Error Response Format
All error responses follow this consistent format:Common HTTP Status Codes
Request succeeded
Resource successfully created
CORS preflight response
Missing or invalid request parameters
Invalid room password
Room, participant, or endpoint not found
Failed to proxy request to participant endpoint
Participant is offline
Example Error Responses
Room Not Found
404
Invalid Password
401
Missing Required Fields
400
Participant Offline
503
Proxy Failed
502
Health Check
The hub exposes a health check endpoint:Content Types
JSON Endpoints
Most endpoints returnapplication/json:
- Room management
- Participant management
- Model listing
- Non-streaming chat completions
Streaming Endpoints
Streaming endpoints returntext/event-stream:
POST /rooms/:code/v1/chat/completions(whenstream: true)GET /rooms/:code/events(Server-Sent Events)