Use Gluesync as your AI model gateway
Gluesync can act as an OpenAI-compatible model gateway on the Core Hub you already run. Client SDKs and tools that speak the OpenAI HTTP API can target your Core Hub base URL, authenticate with a gsa_ platform API key (or a Core Hub JWT/PAT), and have Gluesync route, budget, and account the call across the LLM providers you vaulted in AI Studio.
|
Beta. The model gateway and platform API keys ship as a beta capability of Gluesync 2.3. Behavior, scopes, and limits can still change before general availability. The gateway runs inside your Core Hub — it is not a MOLO17-hosted service. |
This page is the customer how-to for the OpenAI-compatible surface (/v1/…). For agent chat, skills, and runs inside the product, see AI Studio and agent platform. For connecting providers, see AI models and LLM providers.
What you get
-
OpenAI-compatible endpoints on Core Hub:
POST /v1/chat/completions(including SSE streaming),GET /v1/models,POST /v1/embeddings, andPOST /v1/responses. -
Bring-your-own providers vaulted in AI Studio:
OPENAI,OPENAI_COMPATIBLE,ANTHROPIC,AZURE_OPENAI, andOLLAMA. -
Platform API keys with the
gsa_prefix, scopes, model/agent allow-lists, and per-key rate limits. -
Optional hard budgets that reject overspend with HTTP
402and codeBUDGET_EXCEEDED. -
Deterministic routing with
model: "auto", and provider fallback only before the first output token is streamed.
Before you start
-
Gluesync 2.3 (or later) with AI Studio available on Core Hub.
-
At least one LLM provider configured and passing Test connection (see AI models and LLM providers).
-
A user with the Super admin role to create platform API keys and budgets.
-
Network reachability from your client to the Core Hub HTTPS base URL that serves
/v1.
Connect providers in AI Studio
Platform gateway calls only use providers that are already stored in the Core Hub vault.
-
Sign in to the Control Plane as a Super admin.
-
Open Settings → LLM providers.
-
Select Add provider.
-
Choose a provider type and save credentials:
Type Use when OPENAIOfficial OpenAI API.
OPENAI_COMPATIBLEA self-hosted or third-party endpoint that implements OpenAI
/modelsand/chat/completions.ANTHROPICAnthropic Claude API.
AZURE_OPENAIAzure OpenAI resource (base URL, deployment, and API version required).
OLLAMALocal or LAN Ollama HTTP API (no API key).
Field-level detail, egress, and Ollama bind addresses are on AI models and LLM providers.
-
Run Test connection.
-
Confirm the provider remains enabled so it can appear in the gateway model catalog.
Provider API keys are stored encrypted in the Core Hub vault. Gluesync never forwards those vendor keys to your gateway clients.
Create a platform API key
There is no AI Studio screen for platform API keys in this release. Create, list, and revoke keys through the Core Hub HTTP API as a Super admin.
-
Sign in to Core Hub and obtain a JWT or personal access token (PAT) for a Super admin user.
-
Create a key:
POST /api/ai/v1/api-keys
Authorization: Bearer <super-admin-jwt-or-pat>
Content-Type: application/json
{
"name": "gateway-automation",
"scopes": ["models:invoke"],
"agentAllowList": [],
"modelAllowList": [],
"rateLimitPerMinute": 60,
"expiresAt": null
}
-
Store the returned
secretimmediately. Core Hub returns the plaintextgsa_…value once. Later list responses omit the secret. -
Optionally restrict the key with
modelAllowListand/oragentAllowListwhen you know the exact model ids or agent slugs the caller may use. -
To revoke a key later:
POST /api/ai/v1/api-keys/{keyId}/revoke
Authorization: Bearer <super-admin-jwt-or-pat>
Key rules verified in Core Hub
-
Prefix:
gsa_. -
Create/list/revoke:
SUPER_ADMINonly (POST/GET /api/ai/v1/api-keys,POST /api/ai/v1/api-keys/{keyId}/revoke). -
Allowed scopes:
models:invoke,agents:invoke,runs:read,approvals:resolve. -
Default
rateLimitPerMinute:60. Maximum:10000. -
Empty allow-lists mean “no extra restriction beyond scopes”; non-empty lists are enforced on every call.
Example create response shape:
{
"id": "3f2c0a1e-5b7d-4c9a-8e1f-0a2b3c4d5e6f",
"secret": "gsa_...",
"scopes": ["models:invoke"],
"expiresAt": null
}
Set a budget (optional)
Budgets are also API-managed (Super admin only).
-
Assign a budget to an owner or to a specific API key:
PUT /api/ai/v1/budgets
Authorization: Bearer <super-admin-jwt-or-pat>
Content-Type: application/json
{
"subjectType": "API_KEY",
"subjectId": "<api-key-id>",
"costCenter": "ml-platform",
"policy": {
"id": "gateway-key-monthly",
"periodStart": 1772323200000,
"periodEnd": 1775001600000,
"softLimitMicros": 5000000,
"hardLimitMicros": 10000000,
"requestLimit": null,
"inputTokenLimit": null,
"outputTokenLimit": null
}
}
-
Use
subjectTypeOWNERwith a Core Hub user id, orAPI_KEYwith the platform key id from the create response. -
Costs in the policy are micro-units (
hardLimitMicros/softLimitMicros). Soft crossings can warn and still allow the call; a hard limit denies with HTTP402and codeBUDGET_EXCEEDED.
Authenticate gateway calls
Every /v1 request needs a bearer credential:
-
Platform API key —
Authorization: Bearer gsa_…with scopes that cover the operation (chat, embeddings, and responses needmodels:invoke). -
Core Hub JWT or PAT — a signed-in user token with role Manager or Super admin.
Do not send your upstream OpenAI/Anthropic/Azure keys to /v1. Those stay in the vault; the gateway credential is only the Gluesync platform key or Core Hub user token.
Call the OpenAI-compatible endpoints
Point the client at your Core Hub origin with base path /v1 (not a MOLO17 cloud hostname).
Python (OpenAI SDK)
from openai import OpenAI
client = OpenAI(
api_key="gsa_...", (1)
base_url="https://<corehub-host>/v1", (2)
)
completion = client.chat.completions.create(
model="auto", (3)
messages=[{"role": "user", "content": "Summarize today's failed pipelines"}],
stream=False,
)
print(completion.choices[0].message.content)
| 1 | Platform API key returned once at creation time. |
| 2 | Replace <corehub-host> with your Core Hub host; keep the /v1 suffix as the SDK base URL. |
| 3 | "auto" selects the deterministic router over vaulted models. You can also pass an explicit model id from GET /v1/models. |
Streaming works when stream=True; Core Hub emits SSE data: chunks and ends with data: [DONE].
Function tool definitions and tool_choice are forwarded to the provider, and tool_calls are returned to your application (including in SSE deltas); Core Hub does not execute tools on this endpoint.
Requests that include tools require a catalog model whose capabilities include TOOLS (visible on GET /api/ai/v1/models). An explicit model without it—or model: "auto" when no TOOLS-capable model is eligible—returns HTTP 404 with message Model '<id>' is not available (standard Core Hub error body; no dedicated code).
curl
curl -sS https://<corehub-host>/v1/chat/completions \
-H "Authorization: Bearer gsa_..." \
-H "Content-Type: application/json" \
-d '{
"model": "auto",
"messages": [{"role": "user", "content": "Hello from Gluesync"}],
"stream": false
}'
List models:
curl -sS https://<corehub-host>/v1/models \
-H "Authorization: Bearer gsa_..."
Embeddings:
curl -sS https://<corehub-host>/v1/embeddings \
-H "Authorization: Bearer gsa_..." \
-H "Content-Type: application/json" \
-d '{
"model": "auto",
"input": "index this paragraph"
}'
Responses API:
curl -sS https://<corehub-host>/v1/responses \
-H "Authorization: Bearer gsa_..." \
-H "Content-Type: application/json" \
-d '{
"model": "auto",
"input": "Reply with a one-line status"
}'
Authenticated callers can also download the live contract from GET /api/ai/v1/openapi.yaml.
Routing and fallback
-
model: "auto"asks Core Hub to choose among healthy, allowed catalog models using the configured routing policy. -
If the primary provider fails before any assistant content or tool-call delta is emitted, Core Hub can try the next fallback model.
-
After the first streamed output token (or tool-call delta) has been sent to the client, fallback is disabled for that request. A later provider failure ends the stream with an in-band error chunk rather than silently switching models mid-answer.
Limits and error codes
| Limit | Behavior |
|---|---|
Beta |
Gateway and platform keys are beta in 2.3. |
Deployment |
Runs locally in the customer Core Hub. MOLO17 does not host this gateway for you. |
Rate limits |
Enforced per Core Hub node (fixed window). Platform keys default to 60 requests/minute and may be set up to 10000. Owner JWT/PAT traffic uses the same per-node limiter with the owner default of 60/minute when no key is present. |
HTTP 429 |
Body code |
HTTP 402 |
Body code |
HTTP 404 (tools) |
When |
HTTP 400 (tools) |
Non- |
Allow-lists |
Non-empty |
Related
-
AI Studio and agent platform — chat, skills, runs, governance overview
-
AI models and LLM providers — vault setup for
OPENAI,OPENAI_COMPATIBLE,ANTHROPIC,AZURE_OPENAI,OLLAMA -
Core Hub MCP server — separate MCP surface for external agent clients
-
AI as SQL — SQL-facing AI helpers that share the same provider vault