Quick answer
Set your client base URL to https://www.primoraihub.com/v1, send Authorization: Bearer YOUR_API_KEY, and call GET /v1/models before selecting a model ID.
Which endpoint should you use?
- Use
/v1/chat/completionsfor the familiar messages-based chat format. - Use
/v1/responseswhen your application is built around the Responses-style input format. - Use
/v1/messageswhen your integration already follows the Claude Messages request format. - Use
/v1/images/generationsfor documented image-generation requests.
Endpoint parameters and current model availability can change. The API documentation and live /v1/models response are the source of truth.
Try it with cURL
curl https://www.primoraihub.com/v1/models \
-H "Authorization: Bearer $PRIMORDIAL_API_KEY"
curl https://www.primoraihub.com/v1/chat/completions \
-H "Authorization: Bearer $PRIMORDIAL_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "MODEL_ID_FROM_V1_MODELS",
"messages": [{"role": "user", "content": "Hello"}]
}'
Use the OpenAI Python SDK
from openai import OpenAI
client = OpenAI(
api_key="YOUR_PRIMORDIAL_API_KEY",
base_url="https://www.primoraihub.com/v1",
)
models = client.models.list()
model_id = models.data[0].id
response = client.chat.completions.create(
model=model_id,
messages=[{"role": "user", "content": "Hello"}],
)
print(response.choices[0].message.content)
Production checklist
- Fetch and cache the current model list rather than hard-coding an unverified model name.
- Keep API keys in a server-side secret store; do not expose them in browser code or public repositories.
- Log request IDs, latency, status codes, and token usage without logging secret values.
- Confirm the endpoint, model, streaming behavior, and image parameters in the current documentation before release.
Read the complete API documentation or create an account to continue.
Frequently asked questions
What base URL should an OpenAI-compatible client use?
Use https://www.primoraihub.com/v1 and authenticate with a Primordial AI API key.
How do I find the current model ID?
Call GET /v1/models and choose an ID returned by the live endpoint.
Can an existing OpenAI SDK use the gateway?
Point its base URL at the Primordial AI /v1 endpoint, then verify current support in the API documentation before production use.