OpenAI-Compatible Client Setup Checklist: Base URL, API Key and Model ID

Configure OpenAI-compatible clients with the correct Base URL, protected API Key and exact model ID, then test chat and diagnose authentication, model and protocol errors.

HeFu · Published 2026-11-25 · Updated 2026-11-26

3 min read

Most OpenAI-compatible client setups begin with three values: Base URL, API Key and model ID. Preparing them before changing client-specific options makes it easier to distinguish a configuration error from a protocol or model problem.

This checklist applies to clients such as Cursor, Cline and Open WebUI without assuming that their menus or advanced features are identical.

A unified OpenAI-compatible API connection between client applications and model providers

OpenAI-Compatible Client Setup: Prepare the Three Required Values

SettingCurrent value or sourceCheck before saving
Base URLhttps://api.hefu.hk/v1Do not duplicate /v1 or append /chat/completions unless required
API KeyCreate and manage it in the HeFu consoleStore it in a protected credential field; never share it publicly
Model IDLive model catalogCopy the full current ID, not a display-name guess

Some clients call the Base URL “Custom OpenAI URL,” “API address” or “Override Base URL.” Read the field description to determine whether it expects a base URL or a complete chat endpoint.

Keep the API documentation open while configuring advanced options. Chat Completions, Responses and Anthropic Messages are different protocols; “OpenAI-compatible” does not mean that every client feature uses the same request format.

Configure and Test in Order

  1. Add or select an OpenAI-compatible provider in the client.
  2. Enter the Base URL and API Key, save, then reopen the settings to check for truncation.
  3. Copy a currently available chat model ID from the live catalog.
  4. Start a blank conversation without tools, plugins or a complex system prompt.
  5. Send one simple question and record the selected model, latency and any error.
  6. Compare the result with the console call record and wallet usage.

A “test connection” button may check only network access or authentication. It does not prove that the selected model or every client feature works. A minimal conversation is still necessary.

For a second verification path, API Doctor offers free preflight, configuration generation and one explicitly confirmed live compatibility check. Its sanitized report excludes credentials, prompts and model output.

Diagnose Errors by Type

401 or Authentication Failure

Check that the API Key is complete and active, and that the client sends Authorization: Bearer <key>. Do not paste the real key into a chat, log, screenshot or public issue while troubleshooting.

404 or Model Not Found

First check whether the Base URL contains a duplicated path. Then copy the model ID again from the live catalog. If the client automatically appends an unsupported endpoint, consult that client’s custom-provider documentation.

Chat Works but Tools or Agent Features Fail

This is not necessarily a network problem. Basic chat often uses Chat Completions, while an agent or tool may require Responses or a specific tool-call structure. Verify the protocol and model capability separately, and preserve a minimal reproducible request with secrets removed.

Streaming Stops or Times Out

Disable extra plugins and use a short input to isolate the problem. Check the client timeout, network behavior and console record. Do not infer billing from the client message alone; use actual console usage and wallet details.

Final Migration Checklist

  • Test the exact conversation, tool, file-input and streaming features your workflow uses.
  • Use separate credentials for different environments and limit who can view them.
  • Confirm that usage and spending are visible in the console.
  • Preserve the previous working configuration so rollback does not require a full rebuild.
  • Keep one sanitized test prompt and its expected result for future client or model changes.

A careful first test avoids the most common setup loop: changing models when the path is wrong, changing keys when the model ID is wrong, or debugging the network when the client is using a different protocol.

FAQ

Does a successful chat prove that agent and tool calling will work?

No. Chat, agent features, tool calling and completion may use different endpoints or protocol structures. Verify each capability the client actually needs against both the client documentation and the HeFu API documentation.

Why does a model that looks correct return model not found?

Common causes include using a display name instead of the exact model ID, different capitalization or separators, or an outdated model selection. Copy the complete current ID from the live catalog again.

What should the Base URL contain?

For HeFu’s OpenAI-compatible API, the documented Base URL is https://api.hefu.hk/v1. Do not add another /v1 or a chat path unless the client explicitly requires a complete endpoint rather than a base URL.

Next step

Verify the protocol before configuring the client

Confirm the endpoint, authentication and request format, then copy a current model ID from the live catalog and run a minimal conversation test.

Read the API Integration DocsRead API docs