1) Endpoint + Auth
Base URL: https://api.hardcarrx.com
Endpoint: POST /v1/chat/completions
Required header: Authorization: Bearer hxv_... (your virtual key)
HARDCARRX QUICKSTART
HardCarrx gives you one API endpoint for multi-provider LLM routing, caching, and memory. Authenticate with your virtual key, then choose one of two provider-key methods.
Base URL: https://api.hardcarrx.com
Endpoint: POST /v1/chat/completions
Required header: Authorization: Bearer hxv_... (your virtual key)
HardCarrx supports two ways to call providers behind the same virtual key.
curl -X POST https://api.hardcarrx.com/v1/chat/completions \
-H "Authorization: Bearer hxv_your_virtual_key" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-4o-mini",
"messages": [
{"role": "system", "content": "You are a concise assistant."},
{"role": "user", "content": "Give me 3 launch checklist items for an AI feature."}
],
"temperature": 0.3,
"max_tokens": 180,
"provider": "openai"
}'Use this when your project already has a provider key stored in HardCarrx. Send your virtual key, choose the provider, and HardCarrx uses the project-level provider credentials.
curl -X POST https://api.hardcarrx.com/v1/chat/completions \
-H "Authorization: Bearer hxv_your_virtual_key" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-4o-mini",
"messages": [
{"role": "system", "content": "You are a concise assistant."},
{"role": "user", "content": "Give me 3 launch checklist items for an AI feature."}
],
"temperature": 0.3,
"max_tokens": 180,
"provider": "openai",
"provider_key": "sk-provider-key"
}'Use this when you want to pass the provider key directly with the request instead of relying on a stored project credential. Request field names are provider and provider_key(not llm_api_key).
HTTP/1.1 200 OK
x-cache-status: HIT
x-hardcarrx: route=openai:gpt-4o-mini; cache=semantic; mem=profile
content-type: application/json
{
"id": "chatcmpl_abc123",
"object": "chat.completion",
"created": 1763090000,
"model": "gpt-4o-mini",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "1) Define success metrics..."
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 68,
"completion_tokens": 72,
"total_tokens": 140
}
}x-cache-status: HIT / MISS / BYPASSx-hardcarrx includes selected route and gateway metadata.