WiozenAPI

How do you connect an OpenAI-compatible API to a tool you already use?

In short: You give the tool three values: a base URL, an API key and a model name. For the Wiozen API the address is https://api.wiozen.com/v1, the key is the sk-gw-… key from your dashboard, and the model name is one of the names on the Models page, such as wiozen-anthropic. If the tool uses the OpenAI SDK or has an "OpenAI Compatible" option, nothing else in your code has to change.

What does OpenAI-compatible mean?

OpenAI's API uses the /v1/chat/completions path for chat, a request body with a messages array, and a response with a choices field. Over time this format became a common language: editor extensions, terminal agents, chat interfaces and SDKs mostly speak it. When a service calls itself OpenAI-compatible, it accepts the same paths and the same body. On your side only the address, the key and the model name change.

The Wiozen API has /v1/chat/completions, /v1/responses and /v1/models for the OpenAI format. The same key also works with the Anthropic format (/v1/messages). Streaming (stream) and tool calls (tools) work in both.

The three values you need

ValueOn the Wiozen APIUsually called in tools
Base URLhttps://api.wiozen.com/v1base_url, baseURL, API Base, OPENAI_BASE_URL
API keysk-gw-…api_key, apiKey, OPENAI_API_KEY
Model namewiozen-anthropic or another name from the Models pagemodel, Model ID

Don't leave out the /v1 at the end. Most tools build the request by appending /chat/completions to that address. Tools that use the Anthropic format want the address without /v1, as https://api.wiozen.com; Claude Code is one of them.

You create the key on the Keys page of the API dashboard. With one key per tool you can see what each tool spends and switch off a single key when you need to.

Test with curl first

Trying the address and key in a terminal before you open any tool makes it much easier to see where a problem is. Put your key in the API_KEY environment variable and run:

terminal
curl https://api.wiozen.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "wiozen-anthropic", "messages": [{"role": "user", "content": "Hello"}]}'

If choices[0].message.content has text in it, the address, key and model name are right. To see the model names you can use:

terminal
curl https://api.wiozen.com/v1/models \
  -H "Authorization: Bearer $API_KEY"

Python with the OpenAI SDK

Install the official openai package with pip install openai. Pass base_url and api_key when you create the client; the rest of the code is what you would write for OpenAI.

Python
from openai import OpenAI

client = OpenAI(base_url="https://api.wiozen.com/v1", api_key="sk-gw-...")

response = client.chat.completions.create(
    model="wiozen-anthropic",
    messages=[{"role": "user", "content": "Hello!"}],
    max_tokens=16000,
)
print(response.choices[0].message.content)

Don't set max_tokens too low. Models think first on hard questions and that thinking comes out of the same budget; if the budget runs out, the answer can come back empty. The API documentation recommends 16,000 or more.

JavaScript and Node.js

Install the package with npm install openai. Here the field names are baseURL and apiKey.

Node.js
import OpenAI from "openai";

const client = new OpenAI({ baseURL: "https://api.wiozen.com/v1", apiKey: "sk-gw-..." });

const res = await client.chat.completions.create({
  model: "wiozen-anthropic",
  messages: [{ role: "user", content: "Hello!" }],
  max_tokens: 16000,
});
console.log(res.choices[0].message.content);

For streaming, add stream: true to the request. The answer arrives in pieces as Server-Sent Events and the SDK reads them for you.

Connecting a ready-made tool: Hermes Agent

If you don't write code, the same three values still apply; only the place you type them changes from tool to tool. Hermes Agent works with the Wiozen API's OpenAI-compatible endpoint. To connect it:

  1. Outside a chat session, run hermes model in your terminal.
  2. Pick Custom endpoint (self-hosted / VLLM / etc.) from the list.
  3. Enter https://api.wiozen.com/v1 as the address, your Wiozen key as the key, and a name from the Models page as the model.

Hermes saves this to ~/.hermes/config.yaml. If you'd rather edit the file by hand, the block looks like this:

~/.hermes/config.yaml
model:
  default: deepseek-v4.1-flash
  provider: custom
  base_url: https://api.wiozen.com/v1
  api_key: sk-gw-...

Other tools follow the same pattern. In Cline, Roo Code and Kilo Code you choose "OpenAI Compatible" as the provider and enter the same three values. For Cursor, Continue, OpenCode, Aider, Qwen Code, Open WebUI and LibreChat, the setup guides show where each setting goes. The detailed Hermes page is here.

Common errors

StatusMeaningWhat to do
401Missing or invalid keyCheck that you copied the whole key and that the Authorization: Bearer header is set.
400Invalid request or unknown model nameCopy the model name exactly from the Models page. The error message lists the models you can use.
429Balance used up, or the key's spending cap reachedTop up, or raise the cap on the Keys page.
502 / 504The source couldn't respondThe request is not charged; try again shortly.

If a tool shows an empty model list, the address is usually wrong: /v1 is missing, or there's an extra path at the end. Enter the address as shown above and refresh the tool's model list.

Frequently asked questions

Do I have to change my code when moving from OpenAI?

No. Change the base URL, the key and the model name. The request and response format stay the same.

Should the base URL end with /v1?

For the OpenAI format, yes: https://api.wiozen.com/v1. Tools that use the Anthropic format (such as Claude Code) take the root address: https://api.wiozen.com.

Do streaming and tool calls work?

Yes. With stream: true the answer streams as Server-Sent Events, and tool calls through tools work in both the OpenAI and the Anthropic format.

Which model names can I use?

Only the names on the Models page. Any other name returns 400. GET /v1/models returns the list as well.

Can I use one key in several tools?

You can, but a separate key per tool with its own spending cap lets you track spending tool by tool, and if one key leaks you only switch off that one.

If you don't have a key yet, create an account. After you verify your email you get a $0.15 trial balance and can run the curl command above with your own key.

Create your account

More guides: How can you use an AI API from Turkey without a credit card? · How do you calculate the cost of an AI API? · How do you get AI to write and publish articles in WordPress automatically? · How do you find blog topics from RSS feeds and Google Trends? · Does AI-written content show up on Google and in AI answers?