Skip to content

From OpenRouter

OpenRouter and Cloakray both speak the OpenAI format, so most apps move by changing the base URL, the key and the model IDs.

Base URL and key

 const client = new OpenAI({
-  baseURL: "https://openrouter.ai/api/v1",
-  apiKey: process.env.OPENROUTER_API_KEY,
+  baseURL: "https://api.cloakray.com/v1",
+  apiKey: process.env.CLOAKRAY_API_KEY,
 });

Model IDs

OpenRouter prefixes models with their maker; Cloakray IDs have no prefix, and use the maker's own spelling.

OpenRouterCloakray
openai/gpt-5.5gpt-5.5
anthropic/claude-sonnet-4.6claude-sonnet-4-6
google/gemini-3.6-flashgemini-3.6-flash
deepseek/deepseek-v4-flashdeepseek-v4-flash

Look up each model you use on the models page. Variant suffixes such as :free, :nitro or :online are not supported.

Request options

OpenRouter optionOn Cloakray
reasoning: { effort }reasoning_effort on Chat Completions — see reasoning.
provider preferences, models fallback list, routeNot needed. You choose the model; Cloakray serves it. Drop these fields.
transforms, pluginsNot supported. For web results, use the search API.
usage: { include: true }Not needed. Every reply's usage includes cost, the amount charged — see usage and cost.
HTTP-Referer, X-Title headersYou can leave them in; they have no effect.

Standard parameters — tools, response_format, stream, max_tokens, temperature — work as before.

Account endpoints

GET /v1/key returns the key's label, usage and limit in the same shape as OpenRouter's, so scripts that read it keep working. GET /v1/credits returns balance and total_used. See authentication.

Pricing

You pay the model's list price minus any discount on your account, with no fee on top-ups or requests.