GuidesGateway Features

Cova-* Headers Complete Guide

Complete reference for Cova-* request and response headers supported by the CoreValue gateway.

Cova-* Headers Complete Guide

CoreValue Gateway uses Cova-* headers for request metadata and response FinOps data. This is the complete directory.

Tier: Headers are available on all tiers. Cova-Credits-Remaining is only set for pay-the-blanket (PTB) requests.

Request Headers

Set these on your request to CoreValue Gateway:

HeaderPurposeFormatRequiredValidation
Cova-User-IdEnd-user identifierStringNo[a-zA-Z0-9_\-:.], max 256 chars
Cova-Prompt-IdPrompt template identifierStringNo[a-zA-Z0-9_\-:.], max 256 chars
Cova-Property-{Name}Custom key-value metadataStringNoName: [a-zA-Z0-9_] max 64. Value: max 256
Cova-FallbacksFallback model chainJSON arrayNoMax 5 models, non-empty strings
Cova-RateLimit-PolicyRate limit policy overrideStringNoParsed by gateway

Cache Request Headers

HeaderPurposeFormatDefault
Cova-Cache-EnabledEnable read + write"true"/"false"
Cova-Cache-SaveEnable write only"true"/"false"
Cova-Cache-ReadEnable read only"true"/"false"
Cova-Cache-Bucket-Max-SizeMax cached responses per keyNumber1 (max 20)
Cova-Cache-SeedCache isolation seedString
Cova-Cache-Ignore-KeysBody keys to ignore in cache keyJSON array

Example: Setting Request Headers

curl https://gateway.corevalue.dev/v1/chat/completions \
  -H "Authorization: Bearer sk-cova-..." \
  -H "Content-Type: application/json" \
  -H "Cova-User-Id: user_123" \
  -H "Cova-Property-feature: search" \
  -H "Cova-Property-team: growth" \
  -H "Cova-Fallbacks: [\"gpt-4o\",\"claude-3-5-sonnet\"]" \
  -d '{"model":"gpt-4o","messages":[{"role":"user","content":"Hello"}]}'
import { buildHeaders } from "@cova/gateway";

const headers = buildHeaders({
  userId: "user_123",
  properties: { feature: "search", team: "growth" },
  fallbacks: ["gpt-4o", "claude-3-5-sonnet"],
});

Response Headers

The gateway sets these on every response:

HeaderPurposeWhen Set
Cova-IdUnique request ID (UUID)All responses
Cova-ProviderProvider nameAll responses
Cova-ModelModel nameAll responses
Cova-Status"success" or "error"All responses
Cova-Request-CostActual cost in USDNon-streaming: after completion. Streaming: in final SSE event
Cova-Request-Cost-EstimateWorst-case cost estimateAll PTB responses (upfront)
Cova-Credits-RemainingWallet balance after callPTB only
Cova-Gateway-Mode"passthrough" or "translated"When cross-provider translation enabled
Cova-Translation-WarningDropped fields (comma-separated)When fields dropped during translation
Cova-Cache"HIT"On cache hit
Cova-Cache-Bucket-IdxCache bucket indexOn cache hit
Cova-Cache-LatencyCached response latency (ms)On cache hit

Parsing Response Headers

import { wrap } from "@cova/gateway";

const covaResponse = wrap(response, response.headers);
console.log(covaResponse.gateway.requestCost);
console.log(covaResponse.gateway.creditsRemaining);

See Per-Call FinOps Metadata for full field reference.

On this page