Skip to main content
FreeWhat would your company’s AI control layer look like?Build mine

For developers

Change the base URL.
Keep your code.

Point Cline, Claude Code, or your own apps at Hicap and reach every major model through one key. No rewrites, no new SDK.

client.ts+4 −1

1import OpenAI from "openai";
2
3const openai = new OpenAI({
4 apiKey: process.env.OPENAI_API_KEY,
5+ baseURL: "https://api.hicap.ai/v1",
6+ defaultHeaders: {
7+ "api-key": process.env.HICAP_API_KEY,
8+ },
9});
10
11const res = await openai.chat.completions.create({
12 model: "gpt-5.4",
13 messages: [{ role: "user", content: prompt }],
14});

Same SDK. Keep the OpenAI client you already ship, in any language.

Same API calls. Chat completions, embeddings, streaming, and tool calls: unchanged.

Same responses. The response format is identical, so nothing downstream needs to know.

By prompt

Let your coding agent
do the migration.

Paste one prompt into Claude Code, Cursor, Cline, or any assistant that can edit your repo, and it migrates the whole project in a single pass.

  • Finds every client

    Searches for new OpenAI, createOpenAI, OpenAIClient, and helper factories.

  • Moves the key

    Adds HICAP_API_KEY to your env files and drops the old Authorization headers.

  • Leaves your calls alone

    chat.completions, embeddings, and every other call site stay untouched.

migration-prompt.md

Migrate this project from OpenAI direct to Hicap.

Find all OpenAI SDK client initializations and update them to use Hicap:

Required changes:
1. Set baseURL to "https://api.hicap.ai/v1"
2. Add "api-key" header with the Hicap API key
3. Remove any existing apiKey or Authorization headers

The Hicap client config should look like:
{
  baseURL: "https://api.hicap.ai/v1",
  defaultHeaders: { "api-key": <your-hicap-key> }
}

Also:
- Add HICAP_API_KEY to environment variables (.env, .env.example, etc.)
- Update any config files, constants, or helper functions that create OpenAI clients
- Keep all API calls unchanged (chat.completions.create, embeddings, etc.)
- Search for patterns like: new OpenAI, createOpenAI, OpenAIClient, openai.create

Verify

Confirm it
in one call.

Drop in your key and check the endpoint is live before you wire up your tools.

  1. 01

    Export your key.

    Set HICAP_API_KEY in your shell from the key you created in the dashboard.

  2. 02

    Send one request.

    Any model string works. Try a second provider by changing only that string.

  3. 03

    Find it in the log.

    The request shows up with the model you asked for, the model that answered, and its cost.

1curl https://api.hicap.ai/v1/chat/completions \
2 -H "api-key: $HICAP_API_KEY" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "model": "gpt-5.5",
6 "messages": [
7 { "role": "user", "content": "Hello" }
8 ]
9 }'

Reserved capacity routing

Cut your AI spend by up to 30%.

Hicap routes your traffic onto reserved capacity at a fixed price and overflows to on-demand when demand spikes. Same models, same code, a smaller bill.

  1. 01

    Reserved capacity first

    Your baseline runs on capacity bought at a fixed price.

  2. 02

    On-demand for the burst

    Spikes spill over automatically. Nothing queues, nothing drops.

  3. 03

    One bill, up to 30% lower

    Same models, same code. Only the invoice changes.