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

# Estimate sprite usage credits

> Free account-specific estimate, not a reservation or binding quote. Submission checks the current price and your max_credits ceiling again. No account selector is accepted.



## OpenAPI

````yaml /openapi/managed.yaml get /v1/sprite-pricing
openapi: 3.1.0
info:
  title: DreamLayer Agent API
  version: '1'
  description: >-
    Generate images, sprite sheets, and quoted videos; follow executions and
    retrieve owned outputs. Start with https://docs.dreamlayer.io/agent-api for
    authentication, limits, runnable examples, event recovery, and billing.
    Sprite sheets require account capability support and an approved credit
    ceiling. Video requires a quote before acceptance. Video schemas document
    the customer integration fields; response objects may contain additional
    fields. See https://docs.dreamlayer.io/agent-api/video.
servers:
  - url: https://api.dreamlayer.io
security:
  - bearerAuth: []
paths:
  /v1/sprite-pricing:
    get:
      summary: Estimate sprite usage credits
      description: >-
        Free account-specific estimate, not a reservation or binding quote.
        Submission checks the current price and your max_credits ceiling again.
        No account selector is accepted.
      operationId: getSpritePrice
      parameters:
        - name: frame_count
          in: query
          schema:
            type: integer
            minimum: 7
            maximum: 100
            default: 12
        - name: background
          in: query
          schema:
            type: string
            enum:
              - remove
              - keep
            default: remove
      responses:
        '200':
          description: Nonbinding account estimate
          headers:
            Cache-Control:
              schema:
                type: string
                const: private, no-store
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SpriteEstimate'
        '401':
          $ref: '#/components/responses/Unauthenticated'
        '403':
          $ref: '#/components/responses/AccessDenied'
        '422':
          $ref: '#/components/responses/InvalidRequest'
        '429':
          $ref: '#/components/responses/RateLimited'
components:
  schemas:
    SpriteEstimate:
      type: object
      additionalProperties: false
      required:
        - price_version
        - frame_count
        - background
        - credits
        - reference_usd
        - reference_credit_cents
        - binding
      properties:
        price_version:
          type: string
          const: sprite-base-frame-20261017-v1
        frame_count:
          type: integer
          minimum: 7
          maximum: 100
        background:
          type: string
          enum:
            - remove
            - keep
        credits:
          type: string
          pattern: ^\d+(\.\d{1,4})?$
        reference_usd:
          type: string
          pattern: ^\d+\.\d{2}$
        reference_credit_cents:
          type: integer
          minimum: 1
          description: >-
            The authenticated account's undiscounted API credit purchase rate in
            US cents.
        binding:
          type: boolean
          const: false
    ErrorEnvelope:
      type: object
      additionalProperties: false
      required:
        - error
      properties:
        error:
          type: object
          additionalProperties: false
          required:
            - code
            - reason
            - message
            - category
            - retryable
            - request_id
          properties:
            code:
              type: string
              description: Legacy uppercase code retained for existing clients.
            reason:
              $ref: '#/components/schemas/PublicErrorReason'
            message:
              type: string
            category:
              type: string
            retryable:
              type: boolean
            request_id:
              type: string
              format: uuid
            details:
              type: object
              description: >-
                Optional sanitized validation detail. Submitted values are never
                echoed.
              additionalProperties: true
    PublicErrorReason:
      type: string
      enum:
        - invalid_request
        - authentication_failed
        - access_denied
        - resource_not_found
        - insufficient_credits
        - conflict
        - too_many_active_jobs
        - rate_limited
        - quota_exceeded
        - content_refused
        - temporarily_unavailable
        - generation_failed
        - insufficient_frames
        - prompt_policy_blocked
        - feature_unavailable
  responses:
    Unauthenticated:
      description: >-
        Invalid or revoked API key. A missing Authorization header returns 422
        invalid_request.
      headers:
        Cache-Control:
          schema:
            type: string
            const: no-store
        Pragma:
          schema:
            type: string
            const: no-cache
        X-Request-ID:
          schema:
            type: string
            format: uuid
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    AccessDenied:
      description: The authenticated key cannot access this resource
      headers:
        Cache-Control:
          schema:
            type: string
            const: no-store
        Pragma:
          schema:
            type: string
            const: no-cache
        X-Request-ID:
          schema:
            type: string
            format: uuid
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    InvalidRequest:
      description: Invalid request, including a missing required Authorization header
      headers:
        Cache-Control:
          schema:
            type: string
            const: no-store
        Pragma:
          schema:
            type: string
            const: no-cache
        X-Request-ID:
          schema:
            type: string
            format: uuid
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    RateLimited:
      description: >-
        Synchronous request or open-stream limit reached. See
        https://docs.dreamlayer.io/agent-api/limits for scopes and backoff.
        Retry-After and remaining-request headers are not guaranteed.
      headers:
        Cache-Control:
          schema:
            type: string
            const: no-store
        Pragma:
          schema:
            type: string
            const: no-cache
        X-Request-ID:
          schema:
            type: string
            format: uuid
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          example:
            error:
              code: RATE_LIMITED
              reason: rate_limited
              message: Too many requests. Please try again shortly.
              category: RATE_LIMITED
              retryable: true
              request_id: d34db33f-0000-4000-8000-000000000001
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

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