provider

iFLYTEK Spark

Direct answerSpark's general HTTP API, Spark-X1.5, and Spark-X2 use different base URLs. Direct calls use the APIPassword for that service, while this gateway uses its own Bearer token and adapted path.

Updated · Reviewed

Direct provider access versus this gateway

Direct access uses the APIPassword created for a specific iFLYTEK service as a Bearer credential. Gateway calls use this site's base URL and Bearer token. This page declares only /v1/chat/completions; the provider's /v2, /x2, and legacy WebSocket addresses are not gateway endpoints.

Versions, paths, and model values

The official general HTTP base is https://spark-api-open.xf-yun.com/v1, Spark-X1.5 uses /v2, and Spark-X2 uses /x2. General-service values include Ultra=4.0Ultra, Max=generalv3.5, and Pro=generalv3; X2/X1.5 may use spark-x. There is no universal endpoint ID that replaces these values: service URL, credential, and model/domain must be checked as one set. On this gateway, use a name enabled in its model list because the channel may map it.

Streaming, thinking, and tools

Official HTTP streams use SSE and terminate with [DONE]. Spark-X2 can return reasoning_content and accepts thinking=enabled|disabled|auto. Tool and search support is version-specific, and the X2 guide says function and web_search cannot be supplied together. The application still executes functions and must validate arguments and authorization.

Errors and cost safety

Business codes can distinguish unfinished requests, token limits, daily quotas, per-second limits, and concurrency limits, so HTTP status alone is insufficient. Bound retries and set concurrency, timeouts, output caps, and account alerts. Web or deep search can consume additional tokens. Plans and products change, so use the current console and official notices for pricing and quotas.

Production checklist

Confirm that HTTP rather than legacy WebSocket credentials are in use, then verify version path, APIPassword, model/domain, context, and tool matrix. Through this gateway, also verify the enabled model and adapter; an official model value is not automatically a gateway alias.

Reviewed provider catalog

Latest models by capability

These are provider-catalog models, not a promise of availability on this site. Confirm callable IDs, endpoints, and pricing in the model marketplace.

Text, reasoning, and code

Check live availability in the model marketplace

Use cases

  • Chinese chat and reasoning
  • Function calling
  • OpenAI-compatible API

API protocols

  • /v1/chat/completions

FAQ

Why can I not paste an official APIPassword into this gateway?

An APIPassword is an iFLYTEK direct-access credential for a specific official service. This gateway's /v1/chat/completions uses a gateway-issued Bearer token. If an administrator configures an iFLYTEK channel, the provider credential belongs on the channel, not in client requests.

Why can Spark-X2 not reuse the general /v1 URL?

The official general HTTP base is https://spark-api-open.xf-yun.com/v1, Spark-X1.5 uses /v2, and Spark-X2 uses /x2; X2/X1.5 may use spark-x as the model. These are direct-provider paths, while gateway clients still use only /v1/chat/completions declared here.

How do the product name, model, and domain relate?

They are not interchangeable display labels. In the general service, Ultra maps to 4.0Ultra, Max to generalv3.5, and Pro to generalv3; X2/X1.5 are additionally selected by URL version. Check the URL, APIPassword, and model/domain together.

Official sources

  1. 讯飞星火 HTTP API 文档 Official
  2. iFLYTEK Spark-X2 / X1.5 HTTP API Official