Technical blog · Integration verification # Verify an AI API call: models, responses, usage and charges Verify the request, the generated answer and the recorded cost as separate steps. This workflow helps you keep evidence that is useful when integrating an API or investigating a failed call. Xinghuo AI Gateway · Published 2026-10-13 This guide is written by the service maintainers for developers evaluating Xinghuo AI Gateway (星火AI 智能网关). It describes a verification method, not an independent review or measured uptime or quality results. A [中文版本](https://ai.wfpromax.xyz/guides/api-verification.html) is also available. ## 1. Identify the service you are testing Our website is [ai.wfpromax.xyz](https://ai.wfpromax.xyz/), and the OpenAI-compatible base URL is `https://ai.wfpromax.xyz/v1`. Xinghuo AI Gateway is an independent third-party gateway. It is a different service from iFLYTEK Spark (讯飞星火) and its Token Factory, and is not an official OpenAI, Anthropic or Google service. When searching for the brand, verify the domain and endpoint. See the [service identity and website relationship page](https://ai.wfpromax.xyz/service-info.html) for our public example repositories and the business relationship with the `xh8.net` storefront and `shop.wfpromax.xyz`. Storefront products and gateway API credits require separate checks; do not assume shared accounts, balances or entitlements. ## 2. Inspect the request without sending it Download and review `example.py` from our [GitHub examples](https://github.com/Jiaye-apple/xinghuo-ai-examples) or [Gitee examples](https://gitee.com/jerrylinap/xinghuo-ai-examples). From its directory, run the following command with Python 3.9 or later. The script only uses the standard library. ``` python3 example.py chat --model YOUR_MODEL_ID --dry-run ``` `--dry-run` prints a redacted request without network access or a real key. Check that the final URL contains `/v1` only once, the method is POST, `stream` is false, and an output limit is present. `YOUR_MODEL_ID` is a placeholder; this step does not establish model availability or permission. ## 3. Check model IDs with your own key Follow the [integration guide](https://ai.wfpromax.xyz/guides/en/openai-compatible-api.html) to store a site-issued key in the local or server environment variable `XINGHUO_API_KEY`, then run: ``` python3 example.py models ``` Check the exact IDs in the returned `data` list and review current prices and permissions on the [models and groups page](https://ai.wfpromax.xyz/available-channels). A model list establishes which identifiers the endpoint returned. It does not demonstrate that every listed model can generate an answer at that moment, and a model name alone cannot establish the identity of the upstream model. ## 4. Send one bounded generation request A generation request may incur a charge. Replace the placeholder with an ID verified in the previous step, then run one short request: ``` python3 example.py chat --model YOUR_MODEL_ID --prompt 'Reply with hello only' --max-tokens 32 ``` The example does not retry automatically and sets a 60-second network timeout. It uses non-streaming Chat Completions; whether `max_tokens` is accepted depends on the selected model. Investigate unsupported parameters before changing and retrying a request. Check the HTTP status, valid JSON, the answer in `choices` and its finish reason. HTTP 200 or a “request sent” message is insufficient on its own. A timeout does not prove the upstream service did no work; check usage before deciding to retry. ## 5. Match response usage to the account record Record the request time and time zone, model, request identifier if supplied, input and output tokens, and finish reason. Find the corresponding record in the console or [usage lookup](https://ai.wfpromax.xyz/key-usage), then compare its charge using the applicable group, billing units and prices at the time. The `usage` fields can vary by model and interface. Missing usage does not mean the call was free. Input, output and cached tokens may have different rates, so multiplying total tokens by a single price may be incorrect. See the [token billing guide](https://ai.wfpromax.xyz/guides/en/token-billing.html). If records differ, retain a redacted response and time range for site support. ## 6. Verify the features your application needs The short call above covers one model, one interface and one request at a specific time. Before production use, separately test streaming completion, tool arguments, long context, multimodal input and concurrency limits where relevant. Bound sample size and cost, and record expected and actual results. A single successful request does not establish long-term reliability. ## What each result supports | Check | Evidence to retain | Supported conclusion | | --- | --- | --- | | Offline preview | Redacted URL, method and body | Request construction matches expectations; no network test | | Model listing | Returned model IDs at the time | Listing succeeded; generation remains untested | | Generation | Status, answer, finish reason and time | The outcome of that specific request | | Usage and charge | Response usage, matching account record and billing terms | Whether that request's cost can be reconciled | | Application features | Scenario, samples, expectations and results | Behavior within the tested scenarios | Never publish API keys, private account or order details, or original business data in public feedback. Redact sensitive response content as well. Continue with the [401, 403, 404, 429 and 503 troubleshooting guide](https://ai.wfpromax.xyz/guides/en/api-errors.html) or the [documentation overview](https://ai.wfpromax.xyz/guides/en/overview.html).