Skip to main content
Documentation
Get started / Documentation home

Stellahub API Documentation

Prepare the access details issued to your organization, discover an available model ID, then make the first OpenAI-compatible request.

GPT guide

Prepare these three values

API KEY

Stellahub API key

Keep the issued value in local environment variables or a server-side secret store.

OPENAI BASE URL

Organization-supplied base URL

Use the complete OpenAI-compatible address supplied to you; this guide expects it to end in /v1.

MODEL

Exact model ID

Copy an ID from the model list authorized for the current API key. Do not infer it from a product name.

An API key alone is not enough to configure a client. Ask the organization that issued the key for the matching base URL; do not substitute an upstream provider key.

Configure environment variables

Start with this template, then query the models endpoint before choosing a GPT model ID.

OpenAI-compatible clients

Shell / macOS / Linux
# Use the complete URL supplied by your organization. Do not invent a path.
export STELLAHUB_API_BASE_URL="<organization-supplied OpenAI base URL ending in /v1>"
export STELLAHUB_API_KEY="<your Stellahub API key>"
export STELLAHUB_MODEL="<an exact id returned by /v1/models>"

# OpenAI SDK and compatible clients
export OPENAI_BASE_URL="$STELLAHUB_API_BASE_URL"
export OPENAI_API_KEY="$STELLAHUB_API_KEY"

Use the supplied base URL consistently across the OpenAI SDK and compatible clients. Keep the key outside source control, browser code, and screenshots.

Discover a model, then send a request

The API uses an OpenAI-compatible request shape. First confirm what the current key can access:

GET /v1/models
curl "${STELLAHUB_API_BASE_URL}/models" \
  -H "Authorization: Bearer ${STELLAHUB_API_KEY}"

Set STELLAHUB_MODEL to an exact id from that response, then send a non-streaming test request:

POST /v1/chat/completions
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": "Hello"}],
    "stream": false
  }'
Availability, feature behavior, and limits are determined by the returned model ID and the key’s authorization. Validate streaming, tools, vision, reasoning, and context limits against the model you actually receive.

Use the focused GPT guide

The GPT guide explains the model-discovery step and includes cURL, Python, and Node.js call examples.

Open the GPT guide

Troubleshooting

  • 401: verify the key is present and has not been truncated.
  • 403: verify the base URL and organization authorization with the key issuer.
  • 404: use the complete supplied base URL and do not duplicate the /v1 path segment.
  • 429: review quota and rate-limit settings with the organization that issued the key.
  • Model unavailable: re-run GET /v1/models and use only an ID returned for the current key.

Frequently asked questions

Technical guidance for configuring and operating an organization-issued Stellahub integration.

01

Platform & access

What is Stellahub?

Stellahub documents an OpenAI-compatible integration route. The organization that issues your credentials determines the base URL, available models, and access policy.

Do I need an account with every model provider?

No. Use only the API key and endpoint supplied by your organization. Do not replace them with a key from an upstream provider.

Which models can I call?

Run GET /v1/models with the current API key and copy an exact id from the response. The list is the source of truth for that key.

02

Secure use

Where should I store an API key?

Keep it in local environment variables or a server-side secret store. Never commit it to source control or include it in screenshots, browser code, or public tickets.

Can a browser application hold an API key?

No. Public browser bundles expose credentials. Send requests through your own server or another access-controlled backend instead.

What should I do if a key may be exposed?

Stop using the key and follow your organization’s revocation or replacement process. When asking for help, share the key name or suffix instead of the full value.

03

Integration & compatibility

Do I need to rewrite my application?

Usually no. Configure the organization-supplied base URL and API key, then use an exact model id returned by GET /v1/models.

Which languages and SDKs can I use?

Any language that can send HTTPS requests can integrate. OpenAI SDKs and compatible clients can use the supplied base URL; verify actual model capabilities before production use.

Can I use a third-party client?

If the client supports a custom OpenAI-compatible base URL, configure it with the address, key, and model id issued to your organization. Keep the key in the client’s private configuration only.

Why does a model name fail?

Product names are not API identifiers. Re-run GET /v1/models and use an exact id returned for the current key.

04

Usage & billing

Where can I check usage and charges?

Ask the organization that issued the key which dashboard or reporting process applies. Pricing, quotas, and charge handling are organization-specific.

Why can token usage differ from an estimate?

Input context, generated output, tool definitions, and multi-turn history can all change the total tokens in a request.

How should I separate applications or teams?

Ask the credential issuer to provision the appropriate credentials or access scopes for each use case. Do not share a key across people or applications unless your organization explicitly permits it.

05

Troubleshooting & support

How should I investigate a failed request?

First check the complete base URL, Authorization header, and exact model id. Then compare the response with the troubleshooting guidance above before retrying.

Who can help with an access or model issue?

Contact the organization or administrator that issued the API key. They can confirm the correct endpoint, authorization, and models available to that key.

How do I validate an advanced model feature?

Start with a non-streaming text request, then validate streaming, tools, vision, reasoning, and context limits against the exact model id that your key can access.