GPT guide
Connect a GPT-capable client through Stellahub’s OpenAI-compatible interface, then select the model ID returned for your API key.
Required access detailsStellahub API key · supplied base URL · model ID
Review environment variables →01 Find the model ID
Model availability is determined by the authorization on your API key. Query GET /v1/models before sending a request:
curl "${STELLAHUB_API_BASE_URL}/models" \
-H "Authorization: Bearer ${STELLAHUB_API_KEY}"Copy an exact returned
id into STELLAHUB_MODEL. If no GPT entry is returned, ask the organization that issued the key instead of guessing a model name.02 Send a first request
Set STELLAHUB_MODEL to the returned ID, then choose a client example.
curl "${STELLAHUB_API_BASE_URL}/chat/completions" \
-H "Authorization: Bearer ${STELLAHUB_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
"model": "${STELLAHUB_MODEL}",
"messages": [{"role": "user", "content": "Give a one-sentence introduction to yourself."}],
"stream": false
}'Text chat uses
POST /v1/chat/completions. Verify streaming, tool use, vision, reasoning, and context behavior against the returned model ID before relying on those features in production.GPT availability notes
Use the Stellahub OpenAI-compatible gateway with the exact GPT model ID returned for your authenticated API key.
- Run GET /v1/models first and copy an exact id from the response.
- Tool use, streaming, vision, reasoning, and context limits depend on the returned model ID and your organization’s authorization.
Seeing 401, 403, 429, or an unavailable model? Review troubleshooting →