Direct answer
Send GET https://www.primoraihub.com/v1/models with Authorization: Bearer YOUR_API_KEY. Read model identifiers from the returned data list. Do not copy an identifier from another provider or assume that list membership guarantees support for every endpoint.
The official OpenAI List models reference documents GET /models and a list of model objects. This page applies that request pattern to Primordial AI's compatible base URL; it is not an OpenAI endorsement of a third-party service.
Call the live endpoint with cURL
export PRIMORDIAL_API_KEY="YOUR_PRIMORDIAL_API_KEY"
curl --fail-with-body \
https://www.primoraihub.com/v1/models \
-H "Authorization: Bearer $PRIMORDIAL_API_KEY"
A live unauthenticated check on 2026-08-24 returned HTTP 401. If this command is rejected, verify that the key is present, has no extra whitespace, belongs to the intended account, and is only loaded on the server.
Read model IDs in Python and JavaScript
Python
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["PRIMORDIAL_API_KEY"],
base_url="https://www.primoraihub.com/v1",
)
models = client.models.list()
model_ids = [model.id for model in models.data]
if not model_ids:
raise RuntimeError("No model IDs returned")
print("\n".join(model_ids))
JavaScript
import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.PRIMORDIAL_API_KEY,
baseURL: "https://www.primoraihub.com/v1",
});
const models = await client.models.list();
const modelIds = models.data.map((model) => model.id);
if (modelIds.length === 0) throw new Error("No model IDs returned");
console.log(modelIds.join("\n"));
For constructor details, see the OpenAI SDK custom base URL guide.
Select a model without guessing
- Fetch the authenticated live list for the same account and environment that will send production requests.
- Choose a candidate ID only after confirming the required endpoint and feature in the current Primordial AI documentation.
- Run one minimal non-streaming request, then separately test streaming, tools, images, or other features your application depends on.
- Pin the verified ID for repeatability, but retain a health check and an explicit replacement process.
Do not automatically choose the first or alphabetically sorted model. The list is discovery data, not a ranking or capability comparison.
Troubleshoot authentication and model-not-found errors
HTTP 401
The Bearer token is missing or invalid. Check the environment variable, header spelling, whitespace, and the Primordial AI account that created the key. Use the API key quickstart to create, store, and test a replacement without exposing the secret.
The list works, but generation rejects the model
Confirm that the ID was copied exactly from the current response and that the selected endpoint supports it. A model visible in discovery is not a blanket promise that every request format or optional parameter is supported.
A previously working ID stopped working
Refresh the live list, compare it with the pinned ID, and alert before changing production traffic. Do not silently switch to an arbitrary first result.
The list is empty or malformed
Log the HTTP status and request ID without logging the API key. Treat an empty or unexpected response as a failed health check rather than continuing with an invented model name.
A safer production refresh pattern
- Fetch the list at deployment or startup and refresh it on a schedule that matches your tolerance for catalog changes.
- Cache only the model metadata your application needs; do not expose the API key or raw credential-bearing request to the browser.
- Validate the configured model against the refreshed list and fail with a clear operator alert when it disappears.
- Keep model selection separate from automatic failover. Replacement models can differ in endpoints, latency, pricing, context, or tool behavior.
- Regression-test the exact request shape used by production after any deliberate model change.
Frequently asked questions
How do I get the current Primordial AI model IDs?
Send an authenticated GET https://www.primoraihub.com/v1/models request and read data[].id.
Does every listed model support every endpoint?
No. Verify the selected model against the current documentation and test the exact endpoint and feature your application uses.
Should I hard-code a model ID?
You can pin a verified ID for repeatability, but validate it against the live list and use an explicit alert or fallback process if it disappears.
Why does GET /v1/models return HTTP 401?
Provide a valid Primordial AI key in the Authorization: Bearer header and keep that key on the server.