diff --git a/docs/llmservice/app-and-service-availability.md b/docs/llmservice/app-and-service-availability.md new file mode 100644 index 00000000..b7affefe --- /dev/null +++ b/docs/llmservice/app-and-service-availability.md @@ -0,0 +1,27 @@ +# B.AI Android App and Service Availability + +The B.AI Android App integrates core B.AI functions and pages. It also provides **B.AI Service Availability**, where users can find Web access URLs and API Base URLs available for their current network environment. This is useful for users in mainland China and other network environments where the primary B.AI Web or API address cannot be reached directly. + +## Download the App + +The B.AI Android App requires Android 8.0 or later. Use either of the following official installation methods: + +- **Google Play:** [Install B.AI from Google Play](https://play.google.com/store/apps/details?id=com.bai.chat). +- **Official APK:** Visit the [B.AI official website](https://b.ai/) and scan the Android download QR code in the upper-right corner. + +The official APK download QR code is also shown below for convenience: + +![B.AI for Android APK download QR code](/img/bai-android-download-qr.png) + +Install the App only through the Google Play listing above or the QR code provided by the official B.AI website. + +## View Available Service Addresses + +Open the B.AI Android App and select **B.AI Service Availability**. The page provides: + +- **Web access URLs:** Open an available address to use B.AI Web services. +- **API Base URLs:** Copy an available address into the Base URL field of your API client or integration. + +When configuring an API client, copy the complete API Base URL displayed in the App without manually adding or removing path segments. For authentication, request protocols, and examples, see the [API Reference](./api/API.md). + +Service-specific addresses are maintained in the App rather than duplicated in this document. Reopen **B.AI Service Availability** whenever you need to check the available addresses for your network environment. diff --git a/docs/llmservice/faq.md b/docs/llmservice/faq.md new file mode 100644 index 00000000..a5db60c3 --- /dev/null +++ b/docs/llmservice/faq.md @@ -0,0 +1,135 @@ +# Frequently Asked Questions (FAQ) + +## 1. What is the difference between B.AI Chat and the API? + +Chat lets you converse directly through the website or app. The API lets developers integrate models into their applications or tools. Available models, features, and billing rules may differ; see the relevant documentation for each service. + +## 2. How do I obtain and use an API Key? + +Create an API Key in the [B.AI console](https://chat.b.ai/key), then configure it in your application or client. Authenticate requests using `Authorization: Bearer ` or `x-api-key`. Keep your key private and avoid exposing it in screenshots, logs, or source repositories. See the [API Reference](./api/API.md). + +## 3. Which API Base URL should I use? + +The production Base URL is `https://api.b.ai/v1`. Choose the request endpoint according to your client's protocol; supported endpoints may vary by model. See the [API Reference](./api/API.md). + +## 4. What can I do if I cannot access B.AI from mainland China? + +Open **B.AI Service Availability** in the B.AI Android app to find currently available web addresses and API Base URLs. Copy the displayed address in full. See [App and Service Availability](./app-and-service-availability.md). + +## 5. Where can I download the B.AI app? + +Install it through [Google Play](https://play.google.com/store/apps/details?id=com.bai.chat), or scan the Android download QR code in the upper-right corner of the [B.AI website](https://b.ai/) to download the APK. Android 8.0 or later is supported. See [App and Service Availability](./app-and-service-availability.md). + +## 6. What if I do not know which model to choose? + +Select Auto in Chat to let B.AI choose an available model for each task. You can select a model manually when you need a fixed model or want to test its capabilities. Auto has no additional selection fee; billing follows the model actually used and its usage. See [Auto Mode](./auto-mode.md). + +## 7. How do I fill in the model name in an API request? + +Open the [API Key page](https://chat.b.ai/key), find the model you want to use, and select the copy button to the right of its name. Paste the copied model ID into the request's `model` field. + +You can also use `GET /v1/models` to retrieve the models available to your current API Key. Confirm that the selected model supports the endpoint you are using. See the [API Reference](./api/API.md). + +## 8. How are input, output, cache writes, and cache reads billed? + +Input is the content sent to the model, and output is the content it generates. Cache writes create reusable cached content, while cache reads reuse it in later requests. Rates, cache durations, and billing behavior vary by model. Some models also count reasoning tokens as output usage. See the relevant model details. + +## 9. How do explicit and implicit caching differ? Are there extra charges? + +Explicit caching typically involves caches created or specified by the caller. Implicit caching automatically identifies reusable content. Both may incur cache write or read charges, and some models also charge for explicit cache storage based on its duration. See the model details for supported caching options and rates. + +## 10. Does web search incur an additional charge? + +Web search is billed separately per use, with rates varying by model. Search results included in the model's context may also incur token charges. Check the model's web search pricing and your usage records. + +## 11. Why might my actual charge differ from the documented price? + +Model prices in the documentation are based on the model providers' official list prices and serve as B.AI standard reference prices. B.AI may offer discounts or limited-time promotions on this basis; offer details are shown in [Promotions and Pricing Updates](./promotions-and-pricing-notices.md) and the website's discount groups. Applicable prices, offer terms, and final charges are subject to the platform display and actual billing records. + +Actual charges may also depend on cache hits, context tiers, time-based pricing, and tool usage. See [Pricing and Usage](./pricing-and-usage.md). + +## 12. How long do discounted prices last? {#discount-duration} + +Discount promotions may start, change, or end in line with suppliers' promotional arrangements, without further notice. The validity period is subject to the promotion details. Before running large batch jobs, check the current prices displayed on **B.AI platform pages and discount groups**. + +## 13. How do long-context rates and DeepSeek Peak and Off-Peak pricing work? {#12-how-do-long-context-rates-and-deepseek-peak-and-off-peak-pricing-work} + +Some models apply different rates when input exceeds a specified length. See the model details for the threshold and which parts of the request those rates cover. + +For DeepSeek models with time-based pricing, Peak periods are Monday through Friday, excluding Chinese statutory public holidays, from 09:00-12:00 and 14:00-18:00 Beijing Time (UTC+8). All other periods, including weekends and Chinese statutory public holidays, are Off-Peak. Off-Peak prices are half the Peak prices. B.AI Chat always uses Off-Peak pricing for these models. See [Pricing and Usage](./pricing-and-usage.md). + +## 14. How do I check my balance and actual charges? {#13-how-do-i-check-my-balance-and-actual-charges} + +Use the platform's Usage page to view your balance, the model actually used, token usage, and Credits consumed. Developers can also use the [Balance API](./api/balance.md) to query the balance or quota available to the current API Key. + +## 15. Why were Credits deducted when the model did not provide an answer? {#14-why-were-credits-deducted-when-the-model-did-not-provide-an-answer} + +Model charges are based on actual billable usage, including input, output, cache writes, and cache reads. Having no visible answer does not necessarily mean there was no usage: the request may already have processed input tokens, and some reasoning models may generate reasoning tokens that are not displayed to the user. Such usage may still be billable. + +Check the usage records on the Usage page for the actual charge. If you have a question about a charge, keep the request time and relevant records to help investigate it. + +## 16. How should I troubleshoot API errors? {#15-how-should-i-troubleshoot-api-errors} + +Read the error message in the response, then check the following based on its status code: + +| Status code | What to check | +| :--- | :--- | +| `400` | Parameters, request format, and model compatibility with the endpoint | +| `401` | API Key and authentication headers | +| `403` | Account status, subscription, or model permissions | +| `404` | Request path and model ID | +| `429` | Request rate and concurrency; reduce concurrency and retry with exponential backoff | +| `500 / 502 / 503` | Retry later and retain the request ID for investigation | + +See the [API Reference](./api/API.md). + +## 17. Why can a request fail even when the input is below the model's stated context limit? {#16-why-can-a-request-fail-even-when-the-input-is-below-the-models-stated-context-limit} + +**B.AI does not impose an additional context-length limit.** Requests must still follow the rules of the model and its upstream API. + +The stated context capacity is not necessarily available entirely for the main input text. System prompts, conversation history, and tool-related content also consume space, and some APIs reserve capacity for output. Client-side token estimates may also differ from server-side counts, so the length of the main text alone cannot determine whether a request exceeds the limit. + +Trim conversation history, set the maximum output length according to your needs, and leave some context capacity available. If length-related errors persist, split oversized content into smaller parts or extract the key information before submitting it. + +## 18. Why does the Responses API report cache read usage but no cache write usage? {#17-why-does-the-responses-api-report-cache-read-usage-but-no-cache-write-usage} + +Some models use **implicit caching**, which is managed automatically by the upstream service without explicit client configuration. Usage fields may also vary between upstream services, and some responses include only cache read usage without a separate cache write field. + +**A missing write field does not mean caching was ineffective.** Cache read usage greater than 0 indicates that the request hit the cache, but the response alone cannot determine how much new content was written to the cache. + +## 19. Why does my bill show models I did not actively select or do not remember calling? {#18-why-does-my-bill-show-models-i-did-not-actively-select-or-do-not-remember-calling} + +Not actively selecting a model does not necessarily mean your client did not call it. Some clients or tools may call other models for automatic model selection, conversation history compression, subtasks, or background workflows. Multiple applications sharing the same API Key may also generate usage across different models. + +These are possible causes, not confirmed explanations for a particular charge. To identify the source, compare the call time, model, and API Key in your billing records with your client configuration, past conversations, and background tasks. + +## 20. Why did I not receive bonus Credits after topping up? {#19-why-did-i-not-receive-bonus-credits-after-topping-up} + +The top-up bonus promotion has ended. No payment method provides additional bonus Credits on top-ups. Bonus Credits received through previous top-up promotions are valid for **30 days**. We recommend using them within their validity period. + +Registration through any channel does not grant bonus Credits. Inviting someone to register does not grant bonus Credits either. + +## 21. Why can Credits consumption differ severalfold for the same model and seemingly identical context? {#20-why-can-credits-consumption-differ-severalfold-for-the-same-model-and-seemingly-identical-context} + +Credits consumption depends on the actual billable usage and applicable rates for each request. Seemingly identical context does not necessarily mean that the content sent or the usage is exactly the same. Common reasons include: + +1. **Different actual input usage:** The client may include conversation history, system prompts, and tool results. Input is not limited to the text you just sent. +2. **Different cache hit proportions:** Reported cache read usage does not mean that all input was cached. Ordinary input and cache reads may have different rates, so charges can differ significantly even when total input usage is similar. Cache hits are not guaranteed on every request. +3. **Different output usage:** Output is still billed based on actual usage after a cache hit. Some models also include undisplayed reasoning tokens in billable output usage, so visible answer length alone cannot determine the charge. + +**A difference in Credits consumption alone cannot establish that you were overcharged.** Compare the billable usage for ordinary input, cache writes and reads, and output, along with the context tier, time-based rates, and promotional discounts applicable when each request was made. + +## 22. Why do consecutive calls to the same model sometimes hit the cache and sometimes miss it? Is my configuration wrong? {#21-why-do-consecutive-calls-to-the-same-model-sometimes-hit-the-cache-and-sometimes-miss-it-is-my-configuration-wrong} + +**Not necessarily.** Cache hits typically depend on reusable input content and the applicable caching conditions. Calling the same model repeatedly does not guarantee a cache hit. Common factors include: + +- **Changes to the input prefix:** The content or order of system prompts, conversation history, or tool definitions changes. +- **Insufficient cacheable length:** The identical input prefix does not meet the model's minimum cache length. +- **Cache expiration:** The cache has expired or been cleared by the system. +- **Explicit caching conditions are not met:** The initial cache creation has not finished, or the position of the cache marker does not satisfy the matching rules. + +**To improve the cache hit rate:** Place fixed system prompts, reference material, and tool definitions at the beginning of the request, followed by the changing user question. Keep fixed content and tool order consistent, and avoid inserting changing timestamps or random values into the fixed prefix. + +**Qwen example:** For models and endpoints that support the corresponding caching mechanism, implicit caching requires no extra configuration but does not guarantee a hit on every request. Explicit caching requires parameters such as `cache_control` to be configured according to the endpoint, along with the cache creation and matching conditions. Configuration may differ between endpoints. See the [Qwen official caching documentation](https://www.alibabacloud.com/help/en/model-studio/context-cache). + +Caching mechanisms, validity periods, and supported parameters vary by model. diff --git a/docs/llmservice/models/gemini-4-neon.md b/docs/llmservice/models/gemini-4-neon.md new file mode 100644 index 00000000..37ee1a93 --- /dev/null +++ b/docs/llmservice/models/gemini-4-neon.md @@ -0,0 +1,58 @@ +# Gemini 4 Neon + +## Overview + +Gemini 4 Neon is a multimodal reasoning model that Google DeepMind released on November 18, 2026. Adapted from Gemini 4 Carbon, it sits between Hydrogen and Carbon in the Gemini 4 family and is designed to complete complex coding, analysis, and multi-step workflows quickly. + +## Key Features + +- **Multi-file coding** across implementation, debugging, and verification with tests. +- **Tool-assisted workflows** that carry results from one step into the next and adapt to user feedback during a task. +- **Multimodal analysis** that draws on documents, images, audio, and recorded video in the same request. +- **Adjustable reasoning** to balance response time and token use against the difficulty of the task. +- **Long decode** for tasks that need more generation capacity than a single synchronous response allows. + +## Best Use Cases + +- **Software maintenance** for tracing regressions across modules, implementing fixes, and checking them against existing tests. +- **Technical document review** for comparing specifications, diagrams, and recordings to extract requirements or identify inconsistencies. +- **Scientific and quantitative analysis** for exploring mathematical problems and explaining patterns in datasets or charts. +- **Workflow automation** for gathering information, validating it with tools, and returning records that downstream systems can use. + +## Capabilities and Limitations + +| Capability | Description | +| :--- | :--- | +| **Inputs and Output** | Accepts text, images, video, audio, and PDFs, and produces text. | +| **Context Window** | Shares 1,048,576 tokens across input, thinking, and output. | +| **Generation Limit** | The default synchronous limit is 65,536 tokens of thinking and output. Long decode can use the remaining context budget through background execution or continuation. [Long decode guide](https://aistudio.google.com/docs/long-decode) | +| **Thinking Levels** | Supports `low`, `medium`, `high` (default), and `xhigh`. | +| **Tool Use** | Google's Gemini API supports function calling, code execution, file search, URL context, search and map grounding, and computer use. | +| **Structured Output** | Supports JSON responses constrained by a schema. | +| **Video Understanding** | Uses static processing by default and supports optional agentic video understanding in the Gemini API. | +| **Prompt Caching** | The Gemini API supports automatic prefix caching for eligible prompts of at least 4,096 tokens. | + +### Known Limitations + +- **Reasoning cost and latency.** The `xhigh` level can take longer and use more tokens. Difficult prompts can take several minutes. +- **Sampling controls.** The Gemini API uses fixed sampling settings and ignores valid custom `temperature`, `top_p`, and `top_k` values. + +## Standard Pricing + +The token prices below are shown in USD per 1 million tokens; web search is billed in USD per use. + +| Model | Input
(USD / 1M Tokens) | Cache Write
(USD / 1M Tokens) | Cache Read
(USD / 1M Tokens) | Output
(USD / 1M Tokens) | Web Search
(USD / use) | +| :--- | ---: | ---: | ---: | ---: | ---: | +| Gemini 4 Neon | `$3.00` | `$3.00` | `$0.15` | `$15.00` | `$0.014` | + +**Credits settlement:** B.AI converts charges at `1 USD = 1,000,000 Credits` and deducts Credits from the account balance. + +Web search costs `14,000 Credits` per use, equivalent to `$0.014` per use. + +:::info Caching note +For this model on B.AI, cache writes are priced at 1x the input rate. This model supports implicit caching only; the cache-write price shown in the table does not imply support for explicit cache creation. Google's implicit caching requires prompts of at least 4,096 tokens; meeting that threshold does not guarantee a cache hit on every request. +::: + +:::info Pricing note +Model prices in the documentation are based on the model providers' official list prices and serve as B.AI standard reference prices. B.AI may offer discounts or limited-time promotions on this basis; offer details are shown in [Promotions and Pricing Updates](../promotions-and-pricing-notices.md) and the website's discount groups. Applicable prices, offer terms, and final charges are subject to the platform display and actual billing records. +::: diff --git a/docs/llmservice/pricing-and-usage.md b/docs/llmservice/pricing-and-usage.md index ace56d3b..2ac85d82 100644 --- a/docs/llmservice/pricing-and-usage.md +++ b/docs/llmservice/pricing-and-usage.md @@ -100,6 +100,7 @@ The token prices below are shown in USD per 1 million tokens; web search is bill | Claude Sonnet 4.5 | `$3.00` | `$3.75` | `$0.30` | `$15.00` | `$0.01` | | Claude Haiku 4.5 | `$1.00` | `$1.25` | `$0.10` | `$5.00` | `$0.01` | | Muse Spark 1.3 | `$1.25` | `$1.25` | `$0.15` | `$4.25` | - | +| Gemini 4 Neon | `$3.00` | `$3.00` | `$0.15` | `$15.00` | `$0.014` | | Gemini 4 Hydrogen | `$1.50` | `$1.50` | `$0.075` | `$7.50` | `$0.014` | | Gemini 4 Carbon | `$4.00` | `$4.00` | `$0.20` | `$20.00` | `$0.014` | | Gemini 4 Argon | `$2.00` | `$2.00` | `$0.10` | `$10.00` | `$0.014` | diff --git a/docs/llmservice/promotions-and-pricing-notices.md b/docs/llmservice/promotions-and-pricing-notices.md index f5a82f5b..f24ddadb 100644 --- a/docs/llmservice/promotions-and-pricing-notices.md +++ b/docs/llmservice/promotions-and-pricing-notices.md @@ -4,6 +4,10 @@ import ActivityCard from '@site/src/components/ActivityCard'; This page summarizes active and announced upcoming limited-time offers and pricing updates. The [Pricing and Usage](./pricing-and-usage.md) table shows B.AI standard reference prices based on the model providers' official list prices. Discounts and limited-time promotions are shown on this page and in the website's discount groups. Applicable prices, offer terms, and final charges are subject to the platform display and actual billing records. +:::info Promotion validity +Discounts may change or end without further notice. Before running large batch jobs, check the current prices and promotion validity periods displayed on B.AI. See [Model pricing on the B.AI website](https://chat.b.ai/key). +::: + ## Promotions :::info Promotion display order diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current.json b/i18n/zh-Hans/docusaurus-plugin-content-docs/current.json index 52be579b..bfe081b4 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current.json +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current.json @@ -211,6 +211,18 @@ "message": "MiniMax 图片生成 API", "description": "The label for the MiniMax image generation API document in sidebar docsSidebar" }, + "sidebar.docsSidebar.doc.llmservice-faq": { + "message": "常见问题(FAQ)", + "description": "The label for the LLM service FAQ document in sidebar docsSidebar" + }, + "sidebar.docsSidebar.doc.B.AI App and Service Availability": { + "message": "B.AI App 与服务可用性", + "description": "The label for the app availability document in sidebar docsSidebar" + }, + "sidebar.docsSidebar.doc.Gemini 4 Neon": { + "message": "Gemini 4 Neon", + "description": "The label for the Gemini 4 Neon model document in sidebar docsSidebar" + }, "sidebar.docsSidebar.doc.Gemini 4 Hydrogen": { "message": "Gemini 4 Hydrogen", "description": "The label for the Gemini 4 Hydrogen model document in sidebar docsSidebar" diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/llmservice/app-and-service-availability.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/llmservice/app-and-service-availability.md new file mode 100644 index 00000000..23cdd507 --- /dev/null +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/llmservice/app-and-service-availability.md @@ -0,0 +1,27 @@ +# B.AI Android App 与服务可用性 + +B.AI Android App 集成了 B.AI 的主要功能与页面,并提供 **B.AI 服务可用性**功能。中国大陆及其他网络环境的用户如无法直接访问 B.AI Web 或 API,可通过该功能查看当前网络环境下可用的 Web 访问地址和 API Base URL。 + +## 下载 App + +B.AI Android App 支持 Android 8.0 及以上版本,可通过以下官方方式下载安装: + +- **Google Play:** [通过 Google Play 安装 B.AI](https://play.google.com/store/apps/details?id=com.bai.chat)。 +- **官方 APK:** 访问 [B.AI 官网](https://b.ai/),扫描页面右上角的 Android 下载二维码。 + +为方便用户使用,官方 APK 下载二维码也展示如下: + +![B.AI Android App 官方 APK 下载二维码](/img/bai-android-download-qr.png) + +请仅通过上述 Google Play 页面或 B.AI 官网提供的二维码安装 App。 + +## 查看可用服务地址 + +打开 B.AI Android App,进入 **B.AI 服务可用性**,即可查看: + +- **Web 访问地址:** 打开可用地址,使用 B.AI Web 服务。 +- **API Base URL:** 将可用地址复制到 API 客户端或集成工具的 Base URL 配置项中。 + +配置 API 客户端时,请完整复制 App 中展示的 API Base URL,不要自行增加或删除路径。鉴权方式、请求协议及调用示例请参阅 [API 参考](./api/API.md)。 + +具体服务地址由 App 统一维护,本文档不重复列出。需要确认当前网络环境下的可用地址时,请重新打开 **B.AI 服务可用性**查看。 diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/llmservice/faq.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/llmservice/faq.md new file mode 100644 index 00000000..512474f0 --- /dev/null +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/llmservice/faq.md @@ -0,0 +1,135 @@ +# 常见问题(FAQ) + +## 1. B.AI Chat 和 API 有什么区别? + +Chat 适合直接在网页或 App 中对话;API 适合开发者将模型接入自己的应用或工具。两者的可用模型、功能和计费规则可能有所不同,请查看对应页面。 + +## 2. 如何获取和使用 API Key? + +在 [B.AI 控制台](https://chat.b.ai/key)创建 API Key,然后配置到应用或客户端中。请求可使用 `Authorization: Bearer ` 或 `x-api-key` 鉴权。请妥善保管 Key,避免公开到截图、日志或代码仓库。详见 [API 参考](./api/API.md)。 + +## 3. API Base URL 应该填写什么? + +生产环境 Base URL 为 `https://api.b.ai/v1`。具体请求端点需根据客户端使用的协议选择;不同模型支持的端点可能不同。详见 [API 参考](./api/API.md)。 + +## 4. 在中国大陆无法访问 B.AI,怎么办? + +可在 B.AI Android App 的“B.AI 服务可用性”中查看当前可用的 Web 地址和 API Base URL。请完整复制 App 展示的地址。详见 [App 与服务可用性](./app-and-service-availability.md)。 + +## 5. B.AI App 从哪里下载? + +可通过 [Google Play](https://play.google.com/store/apps/details?id=com.bai.chat) 安装,或扫描 [B.AI 官网](https://b.ai/)右上角的 Android 下载二维码获取 APK。支持 Android 8.0 及以上版本。详见 [App 与服务可用性](./app-and-service-availability.md)。 + +## 6. 不知道选哪个模型怎么办? + +在 Chat 中可以选择 Auto,由平台根据每次任务匹配当前账户可用的模型。如果需要固定模型或做能力测试,可以手动选择。Auto 本身不额外收费,按实际执行模型和用量结算。详见 [Auto 模式](./auto-mode.md)。 + +## 7. API 请求中的模型名称怎么填写? + +打开 [API Key 页面](https://chat.b.ai/key),找到需要使用的模型,点击模型名称右侧的复制按钮,即可复制模型 ID,将其填入请求的 `model` 字段。 + +也可以通过 `GET /v1/models` 查询当前 API Key 可用的模型列表,并确认所选模型支持正在使用的端点。详见 [API 参考](./api/API.md)。 + +## 8. 输入、输出、缓存写入和缓存读取分别怎么计费? + +输入是发送给模型的内容,输出是模型生成的内容;缓存写入是建立可复用缓存,缓存读取是后续复用缓存内容。不同模型的费率、有效期和收费方式不同,部分模型还会把推理 Token 计入输出用量,请查看模型详情页。 + +## 9. 显式缓存和隐式缓存有什么区别?会额外收费吗? + +显式缓存通常由调用方主动创建或指定;隐式缓存由服务自动识别可复用内容。两者都可能涉及写入或读取计费,部分模型的显式缓存还收取按存储时间计算的费用。具体支持方式和费用以模型详情页为准。 + +## 10. 联网搜索是否额外收费? + +联网搜索按次单独计费,费率因模型而异。搜索生成的内容若进入模型上下文,还可能产生相应的 Token 费用。请查看模型详情页的联网搜索价格和实际用量记录。 + +## 11. 为什么实际扣费与文档价格不完全一样? + +文档中的模型价格以模型提供方官方原价为基准,作为 B.AI 平台的标准参考价。平台可能在此基础上提供折扣或限时活动,相关优惠将在[活动与调整公告](./promotions-and-pricing-notices.md)及网站的折扣分组中展示。具体适用价格、优惠规则及最终费用,以平台页面展示和实际账单为准。 + +实际费用还可能受到缓存命中、上下文档位、分时价格和工具使用的影响。详见[定价与用量](./pricing-and-usage.md)。 + +## 12. 折扣价能持续多久? {#discount-duration} + +折扣活动可能随供应商的促销安排开始、调整或结束,恕不另行通知。具体有效期以活动说明为准。运行大型批量作业前,建议查看 **B.AI 平台页面及折扣分组**展示的当前价格。 + +## 13. 长上下文和 DeepSeek 峰谷计费怎么理解? {#12-长上下文和-deepseek-峰谷计费怎么理解} + +部分模型在输入超过指定长度后采用不同费率,适用门槛和计费范围见模型详情页。 + +DeepSeek 分时模型的高峰时段为北京时间(UTC+8)周一至周五(不含中国法定节假日)09:00-12:00、14:00-18:00;其余时间,包括周末及中国法定节假日全天,均为空闲时段。空闲价为高峰价的一半,B.AI Chat 中统一采用空闲价。详见 [定价与用量](./pricing-and-usage.md)。 + +## 14. 如何查看余额和实际扣费? {#13-如何查看余额和实际扣费} + +在平台的 Usage 页面查看余额、实际模型、Token 用量和 Credits 消耗。开发者也可通过 [余额 API](./api/balance.md) 查询当前 API Key 可用的余额或额度。 + +## 15. 为什么模型没有给出答案,仍然扣除了积分? {#14-为什么模型没有给出答案仍然扣除了积分} + +模型费用按实际产生的输入、输出及缓存读写等计费用量计算。没有可见答案,并不一定意味着没有产生用量:请求可能已处理输入 Token,部分推理模型还可能生成未展示给用户的推理 Token,这些用量仍可能计费。 + +实际扣费以 Usage 页面中的用量记录为准。如果对某次扣费有疑问,请保留请求时间和相关记录,便于核查。 + +## 16. API 报错应该怎么排查? {#15-api-报错应该怎么排查} + +先查看响应中的错误说明,再按状态码处理: + +| 状态码 | 优先检查 | +| :--- | :--- | +| `400` | 参数、请求格式及模型与端点是否兼容 | +| `401` | API Key 和鉴权请求头 | +| `403` | 账户状态、订阅或模型权限 | +| `404` | 请求路径和模型 ID | +| `429` | 调用频率及并发量,降低并发并使用指数退避重试 | +| `500 / 502 / 503` | 稍后重试,并保留 request ID 供排查 | + +详见 [API 参考](./api/API.md)。 + +## 17. 为什么输入未达到模型标注的上下文上限,仍可能报错? {#16-为什么输入未达到模型标注的上下文上限仍可能报错} + +**B.AI 平台未额外设置上下文长度限制**,实际调用仍需遵循模型及上游接口的规则。 + +模型标注的上下文容量,不一定全部用于正文输入。系统提示词、历史对话和工具相关内容也会占用空间,部分接口还会为输出预留容量。此外,客户端估算的 Token 数可能与服务端统计存在差异,因此不能仅凭正文长度判断是否超限。 + +建议精简历史消息、按实际需求设置最大输出长度,并为上下文保留一定余量。若仍出现长度相关报错,可将超长内容分段处理,或先提取关键内容后再提交。 + +## 18. 为什么 Responses API 返回了缓存读取用量,却没有缓存写入用量? {#17-为什么-responses-api-返回了缓存读取用量却没有缓存写入用量} + +部分模型采用**隐式缓存机制**,由上游服务自动管理缓存,无需客户端显式指定。同时,不同上游服务返回的用量字段可能不同,部分响应仅包含缓存读取用量,没有独立的缓存写入字段。 + +**缺少写入字段并不代表缓存未生效。** 当缓存读取用量大于 0 时,表示本次请求已命中缓存,但无法仅凭该响应确定新增缓存写入量。 + +## 19. 为什么账单里出现了我没有主动选择或印象中没有调用过的模型? {#18-为什么账单里出现了我没有主动选择或印象中没有调用过的模型} + +没有主动选择某个模型,不一定代表客户端未调用它。部分客户端或工具可能在自动模型选择、历史对话压缩、子任务或后台流程中调用其他模型;多个应用共用同一个 API Key 时,也可能产生不同模型的用量。 + +这些只是可能原因,具体来源需要结合记录核查。建议对照账单中的调用时间、模型和 API Key,检查客户端配置、历史会话及后台任务。 + +## 20. 为什么充值后没有收到赠送积分? {#19-为什么充值后没有收到赠送积分} + +充值赠送活动已结束,所有充值方式均不再额外赠送积分。此前通过充值活动获得的赠送积分,有效期为 **30 天**,建议在有效期内使用。 + +所有渠道注册均不赠送积分,邀请注册也不赠送积分。 + +## 21. 为什么同一个模型、看起来相同的上下文,积分消耗有时会相差几倍? {#20-为什么同一个模型看起来相同的上下文积分消耗有时会相差几倍} + +积分消耗取决于每次请求的实际计费用量和适用价格。看起来相同的上下文,不一定代表实际发送的内容和用量完全相同。常见原因包括: + +1. **实际输入量不同:** 客户端可能携带历史对话、系统提示词、工具返回内容等,输入量不只是本次发送的文字。 +2. **缓存命中比例不同:** 有缓存读取用量,不代表全部输入都命中缓存。普通输入与缓存读取的单价可能不同,因此即使输入总量相近,费用也可能明显不同。缓存也不保证每次都能命中。 +3. **输出用量不同:** 缓存命中后,输出仍按实际用量计费。部分模型还会将未展示的推理 Token 计入输出用量,因此不能只根据可见回答的长短判断费用。 + +**仅凭积分消耗差异,无法判断是否存在多扣。** 核对时,应比较普通输入、缓存读写和输出等各项计费用量,以及请求发生时适用的上下文档位、分时价格和活动优惠。 + +## 22. 为什么连续调用同一模型,缓存有时命中、有时不命中?是配置有问题吗? {#21-为什么连续调用同一模型缓存有时命中有时不命中是配置有问题吗} + +**不一定。** 缓存命中通常取决于请求中可复用的输入内容及对应缓存条件,并非只要模型相同、连续调用就一定命中。常见影响因素包括: + +- **输入前缀变化:** 系统提示词、历史上下文或工具定义的内容、顺序发生变化。 +- **缓存长度不足:** 相同输入前缀未达到模型要求的最小缓存长度。 +- **缓存失效:** 缓存已过期或被系统清理。 +- **显式缓存条件未满足:** 首次创建尚未完成,或缓存标记的位置不符合匹配规则。 + +**提高命中率的建议:** 将固定的系统提示词、资料和工具定义放在请求前部,将变化的用户问题放在后部;保持固定内容和工具顺序一致,避免在固定前缀中加入每次变化的时间或随机值。 + +**以 Qwen 为例:** 在支持相应缓存机制的模型和接口中,隐式缓存无需额外配置,但不保证每次命中;显式缓存需按接口要求配置 `cache_control` 等参数,并满足缓存创建及匹配条件。不同端点的配置方式可能不同。详见 [Qwen 官方缓存说明](https://www.alibabacloud.com/help/en/model-studio/context-cache)。 + +不同模型的缓存机制、有效期及参数支持可能不同。 diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/llmservice/models/gemini-4-neon.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/llmservice/models/gemini-4-neon.md new file mode 100644 index 00000000..a5ddddec --- /dev/null +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/llmservice/models/gemini-4-neon.md @@ -0,0 +1,58 @@ +# Gemini 4 Neon + +## 概述 + +Gemini 4 Neon 是 Google DeepMind 于 2026 年 11 月 18 日发布的多模态推理模型。该模型基于 Gemini 4 Carbon 调整而来,在 Gemini 4 系列中定位于 Hydrogen 和 Carbon 之间,面向需要快速完成的复杂编程、分析和多步骤工作流。 + +## 核心特性 + +- **多文件编程**:结合测试完成跨文件实现、调试和验证。 +- **工具辅助工作流**:将前一步结果用于后续步骤,并在任务过程中根据用户反馈调整处理方式。 +- **多模态分析**:在同一请求中结合文档、图像、音频和录制视频进行分析。 +- **可调节推理**:根据任务难度平衡响应时间和 Token 消耗。 +- **Long Decode**:适用于所需生成容量超出单次同步响应限制的任务。 + +## 适用场景 + +- **软件维护**:跨模块追踪回归问题、实现修复,并通过现有测试验证。 +- **技术文档审核**:比较规格、图示和录制资料,提取需求或识别不一致之处。 +- **科学与定量分析**:探索数学问题,解释数据集或图表中的规律。 +- **工作流自动化**:收集信息、通过工具验证,并返回可供下游系统使用的记录。 + +## 能力与限制 + +| 能力 | 说明 | +| :--- | :--- | +| **输入与输出** | 支持文本、图像、视频、音频和 PDF 输入,输出文本。 | +| **上下文窗口** | 输入、思考和输出共同使用 1,048,576 Token 的统一预算。 | +| **生成上限** | 默认同步响应的思考与输出合计最多 65,536 Token。Long Decode 可通过后台执行或续接使用剩余上下文预算。详见 [Long Decode 指南](https://aistudio.google.com/docs/long-decode)。 | +| **思考级别** | 支持 `low`、`medium`、`high`(默认)和 `xhigh`。 | +| **工具使用** | Google Gemini API 支持函数调用、代码执行、文件搜索、URL 上下文、搜索与地图 grounding,以及计算机操作。 | +| **结构化输出** | 支持受 Schema 约束的 JSON 响应。 | +| **视频理解** | 默认采用静态处理,并支持 Gemini API 中可选的 Agent 视频理解。 | +| **提示词缓存** | Gemini API 对符合条件、至少达到 4,096 Token 的提示词支持自动前缀缓存。 | + +### 已知限制 + +- **推理成本与延迟**:`xhigh` 级别可能需要更长时间并消耗更多 Token;复杂提示词的处理可能耗时数分钟。 +- **采样参数**:Gemini API 使用固定的采样设置,有效的自定义 `temperature`、`top_p` 和 `top_k` 值会被忽略。 + +## 标准价格 + +以下 Token 价格均以美元计价,单位为每 100 万 Token;网页搜索按次计费。 + +| 模型 | 输入
(USD / 1M Tokens) | 缓存写入
(USD / 1M Tokens) | 缓存读取
(USD / 1M Tokens) | 输出
(USD / 1M Tokens) | 网页搜索
(USD / 次) | +| :--- | ---: | ---: | ---: | ---: | ---: | +| Gemini 4 Neon | `$3.00` | `$3.00` | `$0.15` | `$15.00` | `$0.014` | + +**Credits 结算:** B.AI 按照 `1 USD = 1,000,000 Credits` 换算,并从账户余额中扣除 Credits。 + +网页搜索费用为 `14,000 Credits`/次,对应 `$0.014`/次。 + +:::info 缓存说明 +本模型在 B.AI 的缓存写入价格为输入价格的 1 倍。本模型仅支持隐式缓存,表中的缓存写入价格不代表支持显式创建缓存。Google 隐式缓存要求提示词至少达到 4,096 Token;达到长度门槛也不保证每次请求都能命中缓存。 +::: + +:::info 价格说明 +文档中的模型价格以模型提供方官方原价为基准,作为 B.AI 平台的标准参考价。平台可能在此基础上提供折扣或限时活动,相关优惠将在[活动与调整公告](../promotions-and-pricing-notices.md)及网站的折扣分组中展示。具体适用价格、优惠规则及最终费用,以平台页面展示和实际账单为准。 +::: diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/llmservice/pricing-and-usage.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/llmservice/pricing-and-usage.md index 14096ae2..8699c627 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/llmservice/pricing-and-usage.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/llmservice/pricing-and-usage.md @@ -100,6 +100,7 @@ | Claude Sonnet 4.5 | `$3.00` | `$3.75` | `$0.30` | `$15.00` | `$0.01` | | Claude Haiku 4.5 | `$1.00` | `$1.25` | `$0.10` | `$5.00` | `$0.01` | | Muse Spark 1.3 | `$1.25` | `$1.25` | `$0.15` | `$4.25` | - | +| Gemini 4 Neon | `$3.00` | `$3.00` | `$0.15` | `$15.00` | `$0.014` | | Gemini 4 Hydrogen | `$1.50` | `$1.50` | `$0.075` | `$7.50` | `$0.014` | | Gemini 4 Carbon | `$4.00` | `$4.00` | `$0.20` | `$20.00` | `$0.014` | | Gemini 4 Argon | `$2.00` | `$2.00` | `$0.10` | `$10.00` | `$0.014` | diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/llmservice/promotions-and-pricing-notices.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/llmservice/promotions-and-pricing-notices.md index 4d65f372..28434626 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/llmservice/promotions-and-pricing-notices.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/llmservice/promotions-and-pricing-notices.md @@ -4,6 +4,10 @@ import ActivityCard from '@site/src/components/ActivityCard'; 本页汇总当前生效及已公布的近期活动和定价调整公告。[定价与用量](./pricing-and-usage.md)页面的价格总表以模型提供方官方原价为基准,展示 B.AI 标准参考价。相关折扣或限时活动将在本页及网站的折扣分组中展示。具体适用价格、优惠规则及最终费用,以平台页面展示和实际账单为准。 +:::info 活动有效期 +折扣活动可能调整或结束,恕不另行通知。运行大型批量作业前,请查看 B.AI 平台展示的当前价格及活动有效期。详见[官网模型价格](https://chat.b.ai/key)。 +::: + ## 活动 :::info 活动展示规则 diff --git a/package.json b/package.json index ffcde952..005d0a05 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@x402-tron/docs", - "version": "1.5.8", + "version": "1.5.9", "description": "x402-tron documentation", "license": "MIT", diff --git a/sidebars.js b/sidebars.js index 9dfaf2fa..7e45709e 100644 --- a/sidebars.js +++ b/sidebars.js @@ -128,6 +128,8 @@ const sidebars = { items: [ { type: 'doc', id: 'llmservice/introduction', label: 'Introduction', key: 'llmservice-introduction' }, { type: 'doc', id: 'llmservice/quick-start', label: 'Quick Start' }, + { type: 'doc', id: 'llmservice/faq', label: 'FAQ', key: 'llmservice-faq' }, + { type: 'doc', id: 'llmservice/app-and-service-availability', label: 'B.AI App and Service Availability' }, { type: 'doc', id: 'llmservice/auto-mode', label: 'Auto Mode' }, { type: 'doc', id: 'llmservice/pricing-and-usage', label: 'Pricing and Usage' }, { type: 'doc', id: 'llmservice/promotions-and-pricing-notices', label: 'Promotions and Pricing Updates' }, @@ -190,6 +192,7 @@ const sidebars = { label: 'Google (Gemini)', collapsed: true, items: [ + { type: 'doc', id: 'llmservice/models/gemini-4-neon', label: 'Gemini 4 Neon' }, { type: 'doc', id: 'llmservice/models/gemini-4-hydrogen', label: 'Gemini 4 Hydrogen' }, { type: 'doc', id: 'llmservice/models/gemini-4-carbon', label: 'Gemini 4 Carbon' }, { type: 'doc', id: 'llmservice/models/gemini-4-argon', label: 'Gemini 4 Argon' }, diff --git a/static/img/bai-android-download-qr.png b/static/img/bai-android-download-qr.png new file mode 100644 index 00000000..719bc0f3 Binary files /dev/null and b/static/img/bai-android-download-qr.png differ