Quick answer
Send POST https://www.primoraihub.com/v1/messages with x-api-key: YOUR_API_KEY, anthropic-version: 2023-06-01, a model ID from GET /v1/models, max_tokens, and messages.
Endpoint and headers
Do not replace x-api-key with the OpenAI-style Bearer header for this endpoint. For the OpenAI-compatible format, use the separate OpenAI SDK guide.
Try it with cURL
curl https://www.primoraihub.com/v1/models \
-H "x-api-key: $PRIMORDIAL_API_KEY"
curl https://www.primoraihub.com/v1/messages \
-H "x-api-key: $PRIMORDIAL_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "Content-Type: application/json" \
-d '{
"model": "MODEL_ID_FROM_V1_MODELS",
"max_tokens": 512,
"messages": [{"role": "user", "content": "Hello"}]
}'
Use Python requests
import os
import requests
base = "https://www.primoraihub.com/v1"
headers = {
"x-api-key": os.environ["PRIMORDIAL_API_KEY"],
"anthropic-version": "2023-06-01",
"content-type": "application/json",
}
models = requests.get(f"{base}/models", headers=headers, timeout=30).json()
model_id = models["data"][0]["id"]
response = requests.post(
f"{base}/messages",
headers=headers,
json={
"model": model_id,
"max_tokens": 512,
"messages": [{"role": "user", "content": "Hello"}],
},
timeout=60,
)
response.raise_for_status()
print(response.json())
Compatibility checks before release
- Fetch the live model list and verify that the selected ID is available to your account.
- Confirm streaming, tool use, vision, system prompts, and content blocks against the current documentation instead of assuming upstream parity.
- Keep API keys server-side and redact them from logs, screenshots, and public repositories.
- Record status codes, request IDs, latency, and token usage without recording secret values.
The current API documentation is the source of truth for supported request shapes; the live model endpoint is the source of truth for model IDs.
Common failures
- 401/403: check the API key and use
x-api-keyfor Messages. - Model not found: call
GET /v1/modelsand stop using a copied model name. - 400 payload error: confirm
model,max_tokens,messages, and the content format documented for the selected model. - Feature mismatch: test streaming and tools separately; compatibility at the request envelope does not prove every upstream feature is identical.
Frequently asked questions
What endpoint should an Anthropic-style client call?
Use POST https://www.primoraihub.com/v1/messages with x-api-key, anthropic-version, a live model ID, max_tokens, and messages.
How do I choose a Claude model ID?
Call GET /v1/models and select an ID returned by the live endpoint.
Can Claude models use the OpenAI-compatible endpoint too?
The current Primordial AI documentation lists Claude models for both /v1/messages and /v1/chat/completions; verify the current model and request support before release.