Fix Token Plan issues fast
What is the difference between Token Plan and Coding Plan?
| Token Plan | Coding Plan | |
|---|---|---|
| Use cases | Day-to-day work for solo founders, teams, and enterprises | Individual development scenarios |
| Supported models | Text generation and image generation models | Text generation models |
| Billing method | Credits deducted based on token consumption | Billed per model call |
| Usage frequency | Unlimited | Quota per 5 hours / per week |
| API Key and Base URL | Get from the Token Plan page. See Quick start | Get from the Coding Plan page |
| Peak-time performance | Multi-tenant isolation | Requests may queue during peak hours |
| Data security | Your data is not used to train models | User data authorization required |
Important resources
- Token Plan page: Manage your subscription and view usage on the Token Plan page
- API Keys page: View and reset your API keys on the API Keys page
- Supported models: See the full list of models
- Setup guides: Configuration instructions for Claude Code, OpenCode, OpenClaw, and more
Start here: 60-second diagnosis
If your tool is not working and you see errors like 401, 403, 404, invalid access token, invalid api-key, quota exceeded, or connection failures, check these first:
- API key: Must be the Token Plan dedicated key, not a pay-as-you-go
sk-key or a Coding Plansk-sp-key - Base URL: Must contain
token-plan, notdashscope-intlorcoding - Authentication header: Must use
Authorization: Bearer, notx-api-key - Subscription status: Check whether your subscription is active and credits are not depleted
- Updated config: Restart the tool after updating the API key or base URL
Connection and usage
Which text generation models are supported?
Token Plan supports the following text generation models:
- qwen3.7-plus
- qwen3.7-max
- qwen3.6-plus
- qwen3.6-flash
- deepseek-v4-pro
- deepseek-v4-flash
- deepseek-v3.2
- kimi-k2.6
- kimi-k2.5
- glm-5.1
- glm-5
- MiniMax-M2.5
Common errors and solutions
| Error message | Possible causes | Solution |
|---|---|---|
| 401 InvalidApiKey: No API-key provided. | The request did not include the API key in either the Authorization: Bearer or x-api-key header. | Go to the Token Plan page, copy your dedicated API key, and configure it in your tool. |
| 401 InvalidApiKey: Invalid API-key provided. | 1. You used a Qwen Cloud pay-as-you-go key (sk-xxx) or a Coding Plan key (sk-sp-xxx). 2. Your Token Plan subscription has expired. 3. The API key is incomplete or contains spaces. | 1. Confirm you are using the Token Plan dedicated API key. Ensure the key is copied completely without any spaces. 2. Verify whether the subscription has expired. 3. If the error persists, reset the API key, then configure the new key. |
| 400 Model not exist. | The model name does not match any available model. | Check the model name against Supported models and ensure it is spelled exactly as documented. |
| model 'xxx' not found or not supported | The model name is misspelled or uses the wrong case. | Ensure the model name is case-sensitive and matches the model ID listed in Supported models. |
| 400 InvalidParameter: url error, please check url! | The Base URL path does not match the protocol. For example, the OpenAI-compatible path is configured on the Anthropic endpoint, or vice versa. | Choose the endpoint matching the protocol your tool uses: Anthropic-compatible (Claude Code and similar) ends with /apps/anthropic. OpenAI-compatible (Cursor, Qwen Code, and similar) ends with /compatible-mode/v1. |
| 400 InvalidParameter: Range of max_tokens should be [1, xxxx] | The max_tokens value in the request (or the maximum output length in the tool configuration) exceeds the maximum output tokens supported by the current model. | Set max_tokens to a value not exceeding the limit shown in the error message. |
| 400 invalid_parameter_error: The thinking_budget parameter must be a positive integer and not greater than xxxxx | The thinking length configured in the tool (such as thinking_budget or budgetTokens) exceeds the limit supported by the current model. | Set the thinking length to a value not exceeding the limit shown in the error, or remove the parameter for models that do not support thinking mode. |
| invalid access token or token expired | You used the base URL for the Coding Plan or another plan. | Use the correct Token Plan base URL. OpenAI compatible: https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1. Anthropic compatible: https://token-plan.ap-southeast-1.maas.aliyuncs.com/apps/anthropic. |
| Incorrect API key provided | You used the general Qwen Cloud base URL (dashscope-intl.aliyuncs.com). | Use the correct Token Plan base URL. OpenAI compatible: https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1. Anthropic compatible: https://token-plan.ap-southeast-1.maas.aliyuncs.com/apps/anthropic. |
| Range of input length should be [1, xxx] | Your input (including conversation history and code context) exceeds the model's maximum context length. | Start a new session or shorten the context. You can also switch to a model with a larger context window. |
| 429 API-Key Requests rate limit exceeded | Requests were too dense within a short period and triggered the model rate limit. | Wait one minute and retry. If this occurs frequently, reduce the request frequency and verify the API key is not being shared with others. |
| 429 Throttling.AllocationQuota / insufficient_quota | The plan's tokens are depleted -- both the seat quota and the shared quota pack are exhausted. | Wait for the quota to reset at the next billing cycle, or purchase a shared usage package to add more credits. |
| Connection error | The base URL domain is misspelled, or you have a network connection issue. | Check the spelling of the base URL domain and your network connection. |
Image generation
Which image generation models are supported?
Token Plan supports the following image generation models:
- qwen-image-2.0
- qwen-image-2.0-pro
- wan2.7-image
- wan2.7-image-pro
Can I use image models in coding tools?
Image generation models use separate APIs and cannot be called directly through the text model's base URL. You must integrate them through your tool's skill or extension mechanism. For configuration steps, see the image generation model integration section in each tool's setup guide.
How do I use image generation models in coding tools?
Most coding tools (such as Claude Code, Cursor, and Cline) support extension mechanisms like Skills, Slash Commands, or MCP servers. You can use these mechanisms to call image generation models within your coding workflow. For step-by-step instructions, see Integrate multimodal generation models.
Common errors & fixes
Which API key and base URL should I use?
Use a Token Plan dedicated key and a Token Plan base URL:
- API key: Get it from the Token Plan page
- OpenAI compatible:
https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1 - Anthropic compatible:
https://token-plan.ap-southeast-1.maas.aliyuncs.com/apps/anthropic
dashscope-intl URLs and Coding Plan coding-intl URLs do not work with Token Plan keys.
I got 401 or 403. Is my API key invalid?
If you see 401 invalid access token, InvalidApiKey, or 403 invalid api-key, the problem is usually a wrong key type, an expired subscription, a malformed key, or a key and URL mismatch.
Check these points:
- Confirm the key is your Token Plan dedicated key
- Re-copy the key to remove hidden spaces or line breaks
- Confirm your subscription is active on the Token Plan page
- Make sure the base URL contains
token-plan
401 invalid access tokenmeans wrong key type, expired subscription, or malformed key403 invalid api-keymeans you are using a Token Plan key with a non-Token Plan URLIncorrect API key providedmeans you are using a Token Plan key with the generaldashscope-intlURL
Why do I get 404 or connection errors?
If you get 404 status code (no body), endpoint not found, or connection errors, the base URL path is usually wrong for your tool.
Use the correct path for your protocol:
- Anthropic-compatible tools use
/apps/anthropic - OpenAI-compatible tools use
/compatible-mode/v1
token-plan.ap-southeast-1.maas.aliyuncs.com.
Why is my model "not supported"?
If you get model 'xxx' is not supported or model 'xxx' not found, the model ID is usually incorrect, case-sensitive, or copied with extra spaces.
Check these points:
- Use the exact model name from Supported models
- Remove any leading or trailing spaces
- Verify capitalization exactly as documented
How to handle input length limits?
If you get 400 InvalidParameter: Range of input length should be [1, xxx], your context or request exceeds model limits.
Try these fixes:
- Create a new session
- Switch to a model with a larger context window
- In your tool, configure context length limits if available
What should I do if I see data_inspection_failed?
If you see data_inspection_failed, refer to Troubleshooting data inspection errors.
Product features
Can I mix Token Plan, Coding Plan, and pay-as-you-go keys?
No. The API keys and base URLs for Token Plan, Coding Plan, and Qwen Cloud pay-as-you-go are not interchangeable. Do not mix them. Using an incorrect API key will not deduct credits from your Token Plan quota.
Can I use one subscription across multiple tools?
Yes. You can use the same API key in all compatible AI tools, and all usage draws from the same quota.
Are there usage restrictions?
The service is for interactive use in compatible AI programming and agent tools only. It cannot be used for automated scripts or application backends. Violating these terms may result in subscription suspension or revocation of your API key.
Are the models full-featured or quantized?
All supported models in Token Plan are full-featured, unquantized versions.
How do I reset or manage my API key?
Use the Reset button on the API Keys page to reset your key.
Keep these rules in mind:
- After reset, update the key in all tools
- If you resubscribe after expiration, the key changes
- Token Plan supports one key per subscription
Billing and quota
Why am I still billed after subscribing?
If you still see pay-as-you-go charges after subscribing to Token Plan, it is usually one of the following:
- Wrong credentials (most common): Your tool is using a pay-as-you-go API key (
sk-format) and a base URL withouttoken-plan. Use your Token Plan dedicated key and ensure the base URL containstoken-plan. - Tool falling back to general credentials: If your tool has both general and Token Plan credentials configured, it may route requests through the general credentials. Remove the general API configuration and keep only Token Plan credentials.
- Client cache not cleared: After updating credentials, clear the tool's cache and restart it to ensure it uses the new configuration.
How are credits deducted?
Credit consumption is calculated based on the input, cached, and output tokens in each request. The system first deducts credits from your seat quota. After the seat quota is depleted, credits are deducted from the shared usage package. If all credits are used, the service is suspended until the next billing cycle or until you purchase a shared usage package to add more credits.
What happens when my quota runs out?
Once your seat quota is depleted, the system automatically begins deducting from the shared usage package. If you run out of credits entirely, the service is suspended. You can resume the service in one of the following ways:
- Purchase a shared usage package to add more credits
- Wait for your quota to automatically reset at the start of the next billing cycle