> ## Documentation Index
> Fetch the complete documentation index at: https://docs.apistable.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 获取报价

> 查看合格渠道价格与整次最高冻结积分。

> 当前为 API 预览。生成接口尚未接入供应商，成功认证后仍可能返回 503；不会创建任务或扣积分。

## 为完整参数报价

服务端先补齐默认值、过滤不兼容渠道，再应用各渠道计价公式。时长、分辨率、音频、质量和 output\_count 都可能改变总价。

最高冻结覆盖每个结果项的一条成功渠道，不累加全部可能的失败尝试。报价说明受理上界，不保证预览模型可以真实运行。

## 理解费用上限

```bash theme={null}
{
  "is_preview": true,
  "model": "prism-image-2",
  "input": {
    "prompt": "A sculptural chair in warm afternoon light",
    "resolution": "1024"
  },
  "output_count": 4,
  "estimated_credits": 80,
  "max_reserved_credits": 240,
  "channel_quotes": [
    {
      "channel_type": "third_party",
      "credits": 80
    },
    {
      "channel_type": "official",
      "credits": 240
    }
  ],
  "price_version": "preview-2026-10-29",
  "live_available": false
}
```

> channel\_quotes\[].credits 是整批使用该渠道的总价，不是单项价格。此端点返回未冻结的预览估价，不签发 quote\_id，也不是已锁定的购买要约。

## 设置 max\_credits

max\_credits 是整次请求的费用上限。如果服务端最高冻结超过它，必须在生成前拒绝整批；不能静默减少 output\_count，也不在各项之间动态分配不足预算。


## OpenAPI

````yaml openapi.json POST /v1/quotes
openapi: 3.1.0
info:
  title: APIstable API preview
  version: 0.1.0-preview
  description: >-
    Current implemented HTTP surface. / 当前已实现的 HTTP 接口。 Models and quote prices
    are illustrative. Real providers and paid generation are not connected. POST
    /v1/tasks and /v1/chat/completions return 503 provider_not_configured after
    authentication and applicable validation; no credits are reserved or
    charged. Live 202 acceptance, provider callbacks, SSE, idempotent task
    creation, and full model capability adapters remain future integration work.
    Website login sessions are separate from application API keys.
servers:
  - url: https://apistable.com
    description: APIstable API
security: []
tags:
  - name: Models
  - name: Quotes
  - name: Tasks
  - name: Credits
  - name: LLM
paths:
  /v1/quotes:
    post:
      tags:
        - Quotes
      summary: Validate input and estimate credits / 校验与估价
      description: >-
        Public, nonbinding preview estimate. No credits are reserved, no task is
        created, and no quote_id is issued. Unknown parameters are rejected.
        Inputs are checked against the current illustrative model catalog; full
        live supplier compatibility is not yet active. channel_quotes[].credits
        is the entire batch total for that route.
      operationId: createQuote
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TaskRequest'
      responses:
        '200':
          description: Preview quote
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Quote'
        '400':
          description: >-
            validation_error, unsupported_parameter, invalid_output_count,
            unsupported_resolution, or unsupported_duration
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: model_not_found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '413':
          description: payload_too_large
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: credit_limit_exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: model_unavailable or service_unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security: []
components:
  schemas:
    TaskRequest:
      type: object
      additionalProperties: false
      required:
        - model
        - input
      properties:
        model:
          type: string
          minLength: 1
          example: prism-image-2
        input:
          $ref: '#/components/schemas/GenerationInput'
        output_count:
          type: integer
          minimum: 1
          maximum: 4
          default: 1
          description: >-
            Target result count. Images/videos accept 1–4; music and LLM must
            remain 1. Not a concurrency guarantee. / 目标结果数，非同时并发保证。
        fallback:
          type: boolean
          default: false
          description: >-
            Authorizes a higher-priced compatible official fallback after an
            eligible confirmed failure. Live execution is disabled in this
            build.
        max_credits:
          type: integer
          minimum: 0
          description: >-
            Whole-request reservation cap. Reject the entire request when
            max_reserved_credits exceeds it.
    Quote:
      type: object
      required:
        - is_preview
        - model
        - input
        - output_count
        - estimated_credits
        - max_reserved_credits
        - channel_quotes
        - price_version
        - live_available
      properties:
        is_preview:
          const: true
        model:
          type: string
        input:
          $ref: '#/components/schemas/GenerationInput'
        output_count:
          type: integer
          minimum: 1
          maximum: 4
        estimated_credits:
          type: number
          minimum: 0
          description: Credits, not USD. / 积分，非美元。
        max_reserved_credits:
          type: number
          minimum: 0
          description: Credits, not USD. / 积分，非美元。
        channel_quotes:
          type: array
          items:
            type: object
            required:
              - channel_type
              - credits
            properties:
              channel_type:
                type: string
                enum:
                  - third_party
                  - official
              credits:
                type: number
                minimum: 0
                description: Whole-batch total using this channel. / 整批渠道总积分。
        price_version:
          type: string
        live_available:
          const: false
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
            message:
              type: string
    GenerationInput:
      type: object
      additionalProperties: false
      required:
        - prompt
      description: >-
        Current preview input. Supported fields vary by modality and exact
        catalog model. No live provider mapping is implied.
      properties:
        prompt:
          type: string
          minLength: 1
          maxLength: 4000
        duration_seconds:
          type: integer
          description: Video-only; must match the model duration list.
        resolution:
          type: string
          description: Must match the model resolution list.
        aspect_ratio:
          type: string
          enum:
            - '16:9'
            - '9:16'
            - '1:1'
            - '4:3'
        seed:
          type: integer
          minimum: 0
        generate_audio:
          type: boolean
          description: Video only, subject to model support.
        instrumental:
          type: boolean
          description: Music only.
        lyrics:
          type: string
          maxLength: 5000
          description: Music only.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.