iFLYTEK · SparkDesk-v3.1
SparkDesk-v3.1 API
IFLYTEK Spark Pro tier (API version v3.1) for chat, knowledge Q&A, reasoning and code understanding. One API key, an OpenAI-compatible endpoint and the same price for input and output.
Write three promotional posts for a social account from this product description
Sample reply · not generated live
SparkDesk-v3.1 costs $13.1040 per million input tokens and $13.1040 per million output tokens, with unlimited RPM and self-service invoices.
- Model ID SparkDesk-v3.1
- Official tier Spark Pro
- Input $13.1040 / 1M
- RPM Unlimited
- Teams Self-service invoices
The 3.1 release of iFLYTEK Spark Pro
SparkDesk-v3.1 is the 3.1 API release of iFLYTEK's Spark cognitive model and maps to the official Spark Pro tier. The catalog describes it as a model with cross-domain knowledge and language understanding that carries out tasks through natural conversation, covering language understanding, knowledge Q&A, logical reasoning, math problem solving and code comprehension.
iFLYTEK's docs list an 8,192-token context window and an 8,192-token maximum output for this tier. The docs limit the system role to Max and Ultra, and list the web search plugin for Pro. If your app needs a fixed system prompt, use SparkDesk-v3.5 instead.
On AnyAIGC, SparkDesk-v3.1 uses the OpenAI-compatible /v1/chat/completions endpoint with a single Bearer key, with no iFLYTEK APPID, APIKey or APISecret needed. Billing is per token with no concurrency limit.
- Model ID
- SparkDesk-v3.1the model field, case-sensitive
- Official tier
- Spark Prodomain: generalv3
- Context window
- 8,192tokens, per official doc
- Max output
- 8,192tokens, per official doc
- Endpoint
- Chat CompletionsPOST /v1/chat/completions
- Input / output
- Same price$13.1040 per 1M tokens each
What SparkDesk-v3.1 can do
- 01
Natural conversation
Understands and carries out tasks through conversation, a fit for Q&A bots and assistants.
- 02
Knowledge Q&A
Cross-domain question answering across common reference, office and industry topics.
- 03
Logical reasoning
Works through rule checks and comparisons, then states a conclusion.
- 04
Math problem solving
The catalog lists math problem solving, useful for tutoring and formula questions.
- 05
Code understanding
Explains snippets and spots obvious errors for developer tools.
- 06
Web search plugin
The official doc lists the web search plugin for Pro, Max and Ultra; the system role is limited to Max and Ultra.
SparkDesk-v3.1 API pricing
Billed per token at a fixed price, with no subscription or monthly fee. Input and output cost the same.
- Per-token billingInput and output metered separately
- Same input and output price$13.1040 per 1M each
- Unlimited RPMOn by default for every account
- USDOne balance for 300+ models
| Item | Model | AnyAIGC price (USD) |
|---|---|---|
| Inputper 1M tokens | SparkDesk-v3.1 | $13.1040 |
| Outputper 1M tokens | SparkDesk-v3.1 | $13.1040 |
Prices are in US dollars and billed on the tokens you actually use. Input and output cost the same. These are the lowest catalog prices; live prices are on the AnyAIGC model catalog.
Cost examples
Estimated for typical usage by adding up the unit prices above.
-
10,000 support answers
800 input + 300 output tokens each
$144.14
-
One long-document summary
6,000 input + 800 output tokens
$0.089
-
1M input + 1M output
1M input tokens + 1M output tokens
$26.21
SparkDesk-v3.5, v3.1 or v2.1?
Choose v3.5 for system prompts, v3.1 for general chat and Q&A, and v2.1 for existing apps and low-cost tasks.
| Item | SparkDesk-v3.5 | SparkDesk-v3.1 | SparkDesk-v2.1 |
|---|---|---|---|
| iFLYTEK tier | Spark Max | Spark Pro | Early 2.x release |
| API version | v3.5 | v3.1 | v2.1 |
| Context / max outputofficial doc | 8,192 / 8,192 | 8,192 / 8,192 | Not listed |
| System prompt (system role)official doc | Supported | Not supported | Not listed |
| AnyAIGC inputper 1M tokens | $13.1040 | $13.1040 | $8.7360 |
| AnyAIGC outputper 1M tokens | $13.1040 | $13.1040 | $8.7360 |
Tiers and specs come from the iFLYTEK Open Platform docs. Prices are AnyAIGC's current prices; live prices are in the model catalog. Details: SparkDesk-v3.5, SparkDesk-v3.1, SparkDesk-v2.1.
What SparkDesk-v3.1 is good for
- 01 · Q&A
Knowledge Q&A and assistants
Build a help assistant for staff or users, with your rules and reference text in the prompt so the model answers from them.
- 02 · Writing
Copy and summaries
Social posts, product descriptions and meeting-note summaries. Input and output cost the same, so batch costs are easy to estimate.
- 03 · Education
Math and study help
Step-by-step solutions and explanations, enough to validate a learning-app prototype.
- 04 · Development
Code explanation
Add code explanation to an internal tool. Switch to SparkDesk-v3.5 if you need a system prompt.
Call the SparkDesk-v3.1 API in three steps
- Sign up and top up: create an account at anyaigc.ai. Top-ups start at $1, and the balance works across every model on the platform.
- Create an API key: make a token in the console, copy the key that starts with
sk-, and store it in theANYAIGC_API_KEYenvironment variable. - Send a request: call
POST https://anyaigc.ai/v1/chat/completionswithmodelset toSparkDesk-v3.1andAuthorization: Bearer. With the OpenAI SDK, just setbase_urltohttps://anyaigc.ai/v1.
curl https://anyaigc.ai/v1/chat/completions \
-H "Authorization: Bearer $ANYAIGC_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "SparkDesk-v3.1",
"messages": [
{"role": "user", "content": "Explain API rate limiting in three sentences"}
]
}'
import os
from openai import OpenAI
client = OpenAI(
base_url="https://anyaigc.ai/v1",
api_key=os.environ["ANYAIGC_API_KEY"],
)
resp = client.chat.completions.create(
model="SparkDesk-v3.1",
messages=[
{"role": "user", "content": "A customer reports HTTP 429 from our API. How should I troubleshoot it?"},
],
)
print(resp.choices[0].message.content)
print(resp.usage) # input / output tokens for this request
import os
from openai import OpenAI
client = OpenAI(base_url="https://anyaigc.ai/v1", api_key=os.environ["ANYAIGC_API_KEY"])
stream = client.chat.completions.create(
model="SparkDesk-v3.1",
messages=[{"role": "user", "content": "Write five release notes for a SaaS product."}],
stream=True,
)
for chunk in stream:
if not chunk.choices:
continue
delta = chunk.choices[0].delta
if delta.content:
print(delta.content, end="", flush=True)
print()
Parameter tip: the model ID is case-sensitive, so write SparkDesk-v3.1. The response format matches OpenAI Chat Completions, and token counts for the request are in the usage field. The context is limited, so split or retrieve long documents before asking.
See the Chat Completions reference for every parameter. Swap the model name in the examples for the SparkDesk model ID.
SparkDesk-v3.1 API for teams and enterprises
Teams can top up, issue invoices themselves, and work with a dedicated support and technical contact.
- Invoices
Issue them yourself
Issue an invoice in the console for the amount you actually topped up, whenever you need one.
- Dedicated support
Account and technical contacts
Work with a dedicated support contact and technical engineer for onboarding, migration and troubleshooting.
- WeChat Pay
- Alipay
- USDT
- Credit card
Why teams trust AnyAIGC
Trial credit, top-ups, refunds, data handling and billing, spelled out up front.
5M free tokens to start
New accounts get trial credit, so you can test before you top up.
Top up from $1, refundable
Top up from $1. Unused balance can be refunded with no fee.
Official channels, real models
Requests go to official model channels, never cheaper or reverse-engineered substitutes.
No retention, no training
Unless the law requires it, your prompts and outputs are not persistently stored or used for training. See the privacy policy.
Transparent billing, spend caps
See tokens and cost for every request in the console, and set a quota on each API key.
24/7 support
Contact support any time about integration, billing or incidents.
All SparkDesk models
One API key calls every SparkDesk model below. Pick by quality and budget.
Specs and how to choose it
In iFlytek's official WebSocket docs, the v3.1 endpoint (wss://spark-api.xf-yun.com/v3.1/chat) maps to Spark Pro, with domain generalv3.
The docs set Pro's max_tokens range at 1 to 8192, default 4096.
Per the docs, Pro supports the web search plugin. Returning source titles and URLs is limited to Ultra and Max.
This page lists Input at $13.1040, Output at $13.1040, matching the pricing table above.
Choose sparkdesk-v3.5 (Max) if you need web search results to return source titles and URLs, which the docs list as unsupported on Pro.
Specs come from the vendor's official documentation (xfyun.cn). The table on this page is the price, and the model catalog is authoritative for live rates.
SparkDesk-v3.1 API FAQ
How much does the SparkDesk-v3.1 API cost?
On AnyAIGC, SparkDesk-v3.1 is billed per token: $13.1040 per million input tokens and $13.1040 per million output tokens, the same for both. Prices are fixed, with no subscription or monthly fee. Live prices are in the model catalog.
What is the SparkDesk-v3.1 model ID, and how does it relate to iFLYTEK Spark?
The model ID is SparkDesk-v3.1 (case-sensitive). It is a release of iFLYTEK's Spark cognitive model, and AnyAIGC exposes it through an OpenAI-compatible API. It is unrelated to Apache Spark or the Spark email app.
How do I choose between SparkDesk-v3.1 and the other SparkDesk models?
SparkDesk-v3.5 and SparkDesk-v2.1 are the other two in the series. A higher version number maps to a newer iFLYTEK tier: v3.5 is Max, v3.1 is Pro, and v2.1 is an early 2.x release. Pick v3.5 if you need a system prompt. Consider v2.1 when cost matters most and quality needs are modest, and test on your own data before launch. All three charge the same for input and output on AnyAIGC.
Is SparkDesk compatible with the OpenAI API, and how do I call it?
Yes. SparkDesk-v3.1 uses POST https://anyaigc.ai/v1/chat/completions, and requests and responses match OpenAI Chat Completions. With the official OpenAI SDK, set base_url to https://anyaigc.ai/v1. You do not need iFLYTEK's WebSocket signing, only Authorization: Bearer.
How large is the SparkDesk-v3.1 context window?
iFLYTEK's docs list an 8,192-token context window and an 8,192-token maximum output for this tier, so split long documents or retrieve passages before asking. Confirm actual behavior with a test request through AnyAIGC.
Is there a rate limit?
AnyAIGC sets no concurrency limit on SparkDesk-v3.1, and every account gets this by default, so batch jobs and parallel tasks are fine. Billing is per token, with no monthly fee or time-window quota.
Is SparkDesk-v3.1 deprecated?
The current iFLYTEK Open Platform version table still lists the Pro tier. SparkDesk-v3.1 is callable in the AnyAIGC model catalog today; check the catalog for current availability.
How do I get a SparkDesk-v3.1 API key?
Sign up and top up at anyaigc.ai, then create a token in the console. One key works for 300+ models on the platform, so you do not need an iFLYTEK Open Platform APPID, APIKey and APISecret. Set model to SparkDesk-v3.1 in the request body.
Can I get an invoice from AnyAIGC?
Yes. You can issue invoices yourself in the console, for the amount you actually topped up.
Which payment methods are supported?
You can top up with WeChat Pay, Alipay, USDT or a credit card. Your balance is in USD and works across every model on the platform. Invoices can be issued in the console for the amount you topped up.
Is there free trial credit for new users?
Yes. New accounts get 5 million tokens of trial credit, so you can test before deciding to top up. Top-ups start at $1.
Can I get a refund on my balance?
Yes. Unused balance can be refunded with no fee. Contact support to start a refund.
Are these the real models? Is my data safe?
Requests go to official model channels, never cheaper or reverse-engineered substitutes. Unless the law requires it, we do not persistently store your prompts or outputs or use them for training, and the console shows tokens and cost for every request.
Are my prompts used for training?
No. Unless the law requires it, AnyAIGC does not persistently store your prompts or outputs and does not use them for training. Requests are encrypted with HTTPS. See the AnyAIGC Privacy Policy. The model vendor's own data policy is governed by iFLYTEK's terms.
Call SparkDesk-v3.1 with one key
Sign up, create an API key and call SparkDesk-v3.1 in minutes. Your balance works across 300+ models on the platform.