GuidesZero-Friction

Zero-Friction BaseURL Swap

Point existing OpenAI-compatible SDKs at the CoreValue gateway by changing only the baseURL — zero code changes.

Zero-Friction BaseURL Swap

Point your existing OpenAI SDK at CoreValue Gateway — no SDK install required.

Tier: Available on all tiers (Free, Growth, Enterprise).

TypeScript

import OpenAI from "openai";

const client = new OpenAI({
  apiKey: "sk-cova-...", // Your CoreValue API key
  baseURL: "https://gateway.corevalue.dev/v1",
});

const response = await client.chat.completions.create({
  model: "gpt-4o",
  messages: [{ role: "user", content: "Hello" }],
});

Python

from openai import OpenAI

client = OpenAI(
    api_key="sk-cova-...",  # Your CoreValue API key
    base_url="https://gateway.corevalue.dev/v1",
)

response = client.chat.completions.create(
    model="gpt-4o",
    messages=[{"role": "user", "content": "Hello"}]
)

curl

curl https://gateway.corevalue.dev/v1/chat/completions \
  -H "Authorization: Bearer sk-cova-..." \
  -H "Content-Type: application/json" \
  -d '{"model":"gpt-4o","messages":[{"role":"user","content":"Hello"}]}'

What You Get

  • Logging: All requests logged to your CoreValue dashboard.
  • Billing: Credits deducted from your wallet per-call.
  • Rate limiting: Org-level rate limits applied.

What You Don't Get (Without the SDK)

  • Per-call FinOps metadata: Cova-Request-Cost / Cova-Credits-Remaining response headers are set, but you'd need to parse them manually. Use @cova/gateway (TS) or cova-gateway (Python) for typed access. See Per-Call FinOps Metadata.

Supported Providers

All OpenAI-compatible providers work with the baseURL swap:

  • OpenAI, Together AI, Groq, OpenRouter, Fireworks, Mistral, Perplexity, DeepSeek, Cerebras, DeepInfra, Novita, Nebius, Baseten, Chutes, xAI, Canopywave

For non-OpenAI providers, use the model prefix: groq/llama-3.3-70b-versatile, together/meta-llama/..., etc.

On this page