API Doctor: Free API Preflight, Client Configs and Controlled Compatibility Checks

Use HeFu API Doctor to validate model IDs and protocol support, generate client configs and run one explicitly confirmed live check with a sanitized report.

HeFu · Published 2026-11-25

4 min read

HeFu API Doctor is an open-source, local-first browser tool for AI API configuration, model discovery and controlled compatibility diagnostics. It separates a free setup check from a potentially billable live request, so you can inspect a configuration before deciding whether to test it.

Start with Model Discovery and Free Preflight

Connect a HeFu account through OAuth/PKCE or choose an OpenAI-compatible custom endpoint. HeFu OAuth can discover the models available to the current application; a custom endpoint can load model IDs through an explicit GET /models request, or you can enter the exact model ID yourself.

Run the free preflight before any live diagnostic. It checks required fields and advertised protocol support without contacting the endpoint for a generation request. Use the live model catalog to confirm current HeFu model IDs and listed rates rather than guessing a display name.

Custom endpoints must permit browser CORS. Public providers require HTTPS; HTTP is accepted only for literal loopback hosts. For a local Ollama server, API Doctor provides a local option and the API key can remain empty.

Generate a Client Configuration

The configuration generator carries the selected model and protocol into a client starting point without copying OAuth tokens or custom API keys into the generated code.

Client or formatWhat to verify after pasting the configuration
Codex CLI or Claude CodeEndpoint, exact model ID and credential storage
ClineProvider type, Base URL and exact model ID
cURLAuthorization header, endpoint path and JSON body
Python or Node.jsSDK base URL, environment variables and error handling

Protocol details and production integration options belong in the HeFu API documentation. The API Doctor source code and documentation are also publicly available under Apache-2.0.

Run One API Doctor Live Check Only When Needed

  1. Choose the model and the protocol your client uses. HeFu OAuth supports OpenAI Chat Completions, OpenAI Responses and Anthropic Messages; custom OpenAI-compatible endpoints support Chat Completions and Responses.
  2. Review the selected model, endpoint and listed price. Unsupported HeFu protocol choices are not offered for the selected model.
  3. Explicitly confirm one live request. The check sends Reply with OK only. once, non-streaming, with a fixed 32-output-token budget.
  4. Read the HTTP status, latency and response-validation result. There are no automatic follow-up requests, hidden retries or batch runs.

A reasoning model can consume the small test budget before producing a visible message. API Doctor reports that output-budget outcome separately from an incompatible response; it does not spend more tokens automatically. Retest in your own integration with a suitable budget if needed.

Troubleshoot Common Results

  • 401: reconnect OAuth or replace the custom API key.
  • 404: check whether the base URL needs /v1, then verify the protocol path and exact model ID.
  • 429: inspect RPM, TPM, concurrency and daily limits separately instead of assuming that the model is unavailable.
  • CORS or network failure: verify the URL, TLS certificate, local server and browser CORS policy. Do not weaken a provider's global CORS policy just for this check.

What the Report Deliberately Leaves Out

A shareable debugging report should not create a second data leak. API Doctor reports use an allowlist of status, timing, public model ID and safe guidance fields. They exclude credentials, endpoint URLs, prompts, model output and raw provider error messages.

OAuth access tokens, refresh tokens and custom API keys remain in page memory. Leaving or reloading the page clears session credentials. Requests omit browser credentials and reject redirects; the hosted static version requires no application backend.

What a Compatibility Check Does—and Does Not Prove

What a check can help answerWhat it does not prove
Did the selected model and protocol return a non-empty, protocol-appropriate response?The model is best for your workload
Does the configuration use the expected model ID, endpoint and authentication?Streaming, tool calling or every modality is supported
Can you inspect status and timing without exposing the prompt or answer?Production reliability is guaranteed or live requests are free

HTTP 200 alone is not enough: API Doctor checks the expected response structure for the selected protocol. Its current scope is one small, non-streaming text request at a time, not a multimodal suite, batch evaluation, quality benchmark or production certification.

For a production rollout, add your own representative fixtures, streaming and tool-call checks, usage limits, monitoring and a rollback path. API Doctor is a focused preflight and troubleshooting utility—not a universal model certification service.

FAQ

Is API Doctor free to use?

Yes. The open-source tool, preflight and configuration generator are free. A live check may incur provider charges and runs only after explicit confirmation, with one request and a 32-token output cap.

Does a diagnostic report contain my token, prompt or model answer?

No. Reports contain only allowlisted status, timing, public model ID and guidance fields. Credentials, endpoint URLs, prompts, model output and raw provider error messages are excluded.

Which protocols and custom endpoints are supported?

HeFu OAuth supports OpenAI Chat Completions, OpenAI Responses and Anthropic Messages. Custom OpenAI-compatible endpoints support Chat Completions and Responses, including keyless localhost servers such as Ollama.

Does API Doctor benchmark model quality or production reliability?

No. It checks one small non-streaming text request at a time. It does not prove model quality, multimodal support, tool calling, streaming behavior or production reliability.

Related reading

Next step

Start with a free preflight, then decide whether to run a live check

The open-source tool, preflight and configuration generator are free. One live request requires your explicit confirmation and may use your account balance.

Open API DoctorRead API docs