Xinghuo AI Gateway

Developer guides · API access

OpenAI-compatible API quickstart: base URL, key and model

Connect applications to Xinghuo AI Gateway with a site API key, discover permitted model IDs and send a small Chat Completions request using cURL.

Xinghuo AI Gateway · Updated

For an application or script supporting an OpenAI-compatible API, configure three values: a site-issued API key, the base URL and an authorized model ID.

Configure the URL and key

Sign in, create a key and check its group and credits. The SDK base URL is https://ai.wfpromax.xyz/v1. The full Chat Completions endpoint is https://ai.wfpromax.xyz/v1/chat/completions. Avoid appending /v1 twice.

Discover the models permitted for your key

The public catalog describes available groups, but actual key permissions can differ. Query the models endpoint and copy an exact returned ID.

export XINGHUO_API_KEY='replace-with-site-api-key'
curl --fail-with-body --max-time 30 \
  https://ai.wfpromax.xyz/v1/models \
  -H "Authorization: Bearer $XINGHUO_API_KEY"

Send a small request

Replace the model placeholder with an authorized ID. Generation can consume paid credits. Limit output, then inspect the usage record.

curl --fail-with-body --max-time 60 \
  https://ai.wfpromax.xyz/v1/chat/completions \
  -H "Authorization: Bearer $XINGHUO_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{"model":"replace-with-available-model-id","messages":[{"role":"user","content":"Reply hello only"}],"max_tokens":32,"stream":false}'

Confirm success

Check the expected JSON answer and the corresponding site usage record, not just the HTTP status. Test streaming, tools and context limits separately for your workload; compatibility does not guarantee every parameter.

Choose the right endpoint

A Responses client uses /v1/responses with a supported model. Claude Code requires Messages configuration; see the Claude Code guide. Do not put a Chat Completions endpoint into a Messages base URL field.

Protect keys and bound retries

Keep real keys in server environment variables or trusted secure configurations, never in public browser code or repositories. Start with low concurrency. For failures, follow the error guide instead of retrying indefinitely.

Choose a model. Connect your application.

Check current model access and account pricing, then register and buy the credits you need.

View models & pricing Buy credits Create an account →