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

# Estimate credits

> Estimate credits before creating a task. The final amount is settled by the service. This endpoint does not require an API key.



## OpenAPI

````yaml /openapi.json post /billing/estimates
openapi: 3.1.0
info:
  title: LuluLab API · First batch
  version: 1.0.0
  description: >-
    Image generation, video generation, product video planning, product image
    planning, and the common upload and task APIs.
servers:
  - url: https://customer.lululab.ai
    description: Production
security: []
tags:
  - name: Getting started
    description: Upload product photos and estimate credits.
  - name: Creative tasks
    description: Submit an asynchronous workflow task and retrieve its result.
paths:
  /billing/estimates:
    post:
      tags:
        - Getting started
      summary: Estimate credits
      description: >-
        Estimate credits before creating a task. The final amount is settled by
        the service. This endpoint does not require an API key.
      operationId: estimateCredits
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - items
              properties:
                items:
                  type: array
                  minItems: 1
                  maxItems: 20
                  items:
                    type: object
                    required:
                      - workflowId
                    properties:
                      workflowId:
                        type: string
                        description: >-
                          The workflow to estimate, such as ImageGenV2 or
                          VideoGenV2.
                      input:
                        type: object
                        additionalProperties: true
                        description: Use the same input values you plan to submit.
            example:
              items:
                - workflowId: ImageGenV2
                  input:
                    model: gpt-image-2-5-flare
                    resolution: 1K
                    imageCount: 1
      responses:
        '200':
          description: Estimated credits.
          content:
            application/json:
              schema:
                type: object
                properties:
                  credits:
                    type: integer
                  version:
                    type: string
                  breakdown:
                    type: object
                    additionalProperties: true
        '400':
          description: >-
            Request rejected. The response body contains an error title and
            detail.

````

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