AI API
The AI API Connection adds AI chat capabilities to your project, including text, images, tool calls, standard responses, and streaming responses.
You can choose either of these modes:
- Built-in — use a model supplied by DevDeck and pay from your separate AI Balance.
- Custom API — use your own provider endpoint and API key. DevDeck does not charge AI Balance for these calls, but your provider may charge your account.
Before you connect
The first time you configure AI API, DevDeck asks you to choose the project's business region: China or International. This project-level choice controls the available built-in models and data-processing boundary. It cannot be changed after confirmation.
AI Balance is independent of AI Builder credits. A single account balance is shared by all projects created by that account.
Connect a built-in model
- Open the project in DevDeck and select Configure → Connections.
- Find AI API and select Connect or Configure.
- If requested, choose and confirm the project's business region.
- Open Built-in, choose an available model, and add AI Balance if necessary.
- Select Test connection to send a small validation request.
- Select Connect built-in model.
- On the Connection card, select Integrate to send an implementation request to AI Builder, or ask AI Builder to use the connected AI API from the project backend.
- Test the project in Preview, then publish it when you are ready to update production.
After connecting or changing a model, test the result in Preview and publish the project again so production uses the latest configuration.
Connect a custom API
Custom APIs support OpenAI Compatible and Anthropic Messages protocols.
- Open AI API → Custom API.
- Select the protocol.
- Enter the HTTPS API Base URL, model name, and API key. For an OpenAI-compatible service, enter the base ending at
/v1; DevDeck adds/chat/completions. - Select Save configuration. Saving stores a draft and does not call the provider or replace the active connection.
- Select Test connection. DevDeck sends a minimal request using the saved draft.
- After the test succeeds, select Confirm and enable.
If a custom configuration fails its test, the previously enabled configuration remains available. DevDeck stores the API key securely and shows only a masked value when you reopen the settings.
Custom API compliance
A custom endpoint does not inherit DevDeck's mainland filing assurances. Confirm the provider's service region, filing status, privacy terms, and cross-border data requirements yourself.
Built-in models and pricing
The following prices are effective August 27, 2026. Available models depend on the project's business region and current service availability. Refer to the AI API settings for the models you can select.
International models
Prices are in USD per 1 million tokens.
| Model | Input | Output | Cache write | Cache read |
|---|---|---|---|---|
| Claude Opus 4.7 | $5.00 | $25.00 | $6.25 | $0.50 |
| GPT-5.6 | $5.00 | $30.00 | $5.00 | $0.50 |
China model
Prices are in CNY per 1 million tokens.
| Model | Availability | Input | Output | Cache write | Cache read |
|---|---|---|---|---|---|
| Qwen 3.7 Plus | China and International | ¥2.00 | ¥8.00 | ¥2.50 | ¥0.40 |
AI Balance is settled in USD. Qwen 3.7 Plus charges are currently converted at CNY 7.20 = USD 1.00 before they are deducted from the balance. Refer to the usage details in AI Balance for the final charge. Future price changes do not alter charges already incurred.
AI Balance and usage
Open My Account → AI Balance to:
- add $10, $30, or $100 in USD through Stripe;
- view available, reserved, and total consumed balance;
- filter calls by project, mode, status, and date;
- review the model, token total, charge, and duration for each call.
Built-in calls may temporarily show a reserved amount while they are in progress. DevDeck settles the charge from actual usage after the call completes. Requests are rejected when the available balance is insufficient. Custom API calls remain in usage history but have no DevDeck model charge.
Current service limits are 60 requests per account per minute, 5 concurrent requests per project, and 16,384 output tokens per request.
Change or disconnect the AI API
Open Configure → Connections → AI API to select another available model or prepare and test a new custom configuration. Disconnecting removes the active custom credentials and stops new project AI calls. Publish the project again if its user interface or backend behavior should also change.