Skip to navigation

Relay an OpenAI GET: models, files, vector stores, batches

View as Markdown

GET /v1/models and GET /v1/models/{id} answer locally from the gateway’s own catalog — OpenAI’s upstream model list is never proxied (it would enumerate the shared org). Every other admitted GET reads a stateful resource you created through this gateway (a file, vector store, batch, or fine-tuning job, including its bare list form, which is also answered locally from the gateway’s ownership records rather than proxied); an id you don’t own answers the same anonymous 404 as an id that never existed.

Authentication

AuthorizationBearer

Your per-client bearer token — the API key the gateway issued to you. Present it in Authorization: Bearer <token> form. A token that is missing, unknown, or revoked draws a 401. Before the call is sent upstream the token is removed (stripped, or swapped for the upstream’s own credential); it never makes it past the gateway.

Path parameters

pathstringRequired

The path to call on OpenAI’s API, any further / segments included — all of it after /openai/ is passed to https://api.openai.com/ when the gateway’s model catalog and endpoint/field policy admit the request (see the OpenAI tag description and The four model-inference routes are policed, not transparent above). Examples: v1/chat/completions, v1/responses, v1/embeddings, v1/moderations, v1/models, v1/models/{model}, v1/files, v1/files/{id}, v1/vector_stores, v1/batches, v1/batches/{id}/cancel, v1/fine_tuning/jobs, v1/fine_tuning/jobs/{id}/events.

Response

Whatever the upstream answered, relayed as-is (status, headers, body). Rendered here as JSON; the true shape is the upstream provider’s to define.

Errors

400
Bad Request Error
401
Unauthorized Error
404
Not Found Error