API reference

Every endpoint on the model hosting service, with fields and error codes. Base URL: https://api.gpus4all.dev/v1.

Authentication

Send the key as a Bearer token. Keys start with g4a_live_.

Authorization: Bearer g4a_live_<key>

Endpoints

MethodPathPurpose
GET/healthliveness check, no auth
GET/v1/modelslist deployable models
POST/v1/chat/completionschat completions
POST/v1/completionsraw completions
POST/v1/embeddingsembedding vectors
POST/generatenative generate with metadata

POST /v1/chat/completions

Request fields, most of which match the OpenAI reference:

FieldTypeNotes
modelstringrequired, a model id from /v1/models
messagesarrayrequired, role + content pairs
max_tokensintcap on output tokens
temperaturefloat0 to 2, default 0.7
top_pfloatnucleus sampling, default 1.0
streamboolserver-sent events
stopstring|arraystop sequences
userstringoptional id for your own bookkeeping

Response is the OpenAI shape: id, object, created, model, choices[], usage.

POST /v1/embeddings

Input can be a string or an array of strings. Response is the OpenAI embedding shape with a 1536-dimension vector on gpus4all/bge-m3.

POST /generate

Native endpoint. Accepts text, sampling_params, and return_logprob. Response carries text[] and a meta_info block with token counts and cached tokens.

Errors

CodeMeaning
400malformed request, missing model
401bad or missing API key
404model not found
429rate limited or spending cap reached
500we broke something, check status.gpus4all.dev
503model is starting or being redeployed, retry shortly

Rate limits

60 requests per minute per key by default. Raise it per deployment on request. Streaming chunks do not count separately; a stream is one request.