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

# Get AI availability and credit balance

> AI availability, the caller's credit wallet, and the credit cost of each action. Free plans report `planLevel: 0` and a zero wallet.



## OpenAPI

````yaml /openapi.json get /marketing/ai/credits
openapi: 3.0.0
info:
  title: JetEmail API
  version: 1.0.0
  description: API documentation for JetEmail's transactional email service.
servers:
  - url: https://api.jetemail.com
    description: Production
security:
  - apiKeyAuth: []
tags:
  - name: Email
    description: Send transactional email
  - name: Outbound
    description: 'Outbound sending: keys, SMTP users, domains, logs, suppression'
  - name: Inbound
    description: Inbound routing, domains and forward destinations
  - name: DMARC
    description: DMARC aggregate-report domain setup, DNS verification and analytics
  - name: Marketing
    description: >-
      Marketing suite: templates, audiences, contacts, broadcasts, themes,
      assets and signup forms
  - name: Signup Forms
    description: Hosted signup pages and form submissions
externalDocs:
  description: Download OpenAPI Specification
  url: /openapi.json
paths:
  /marketing/ai/credits:
    get:
      tags:
        - Marketing
      summary: Get AI availability and credit balance
      description: >-
        AI availability, the caller's credit wallet, and the credit cost of each
        action. Free plans report `planLevel: 0` and a zero wallet.
      responses:
        '200':
          description: Availability and credits
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  enabled:
                    type: boolean
                    description: >-
                      Global kill switch. When false, generation is unavailable
                      for every account.
                  credits:
                    $ref: '#/components/schemas/MarketingAiCredits'
                  costs:
                    type: object
                    description: Credit cost per action, keyed by action name.
                    additionalProperties:
                      type: integer
                    example:
                      subject_variants: 1
                      rewrite_block: 1
                      translate_block: 2
                      draft_email: 4
                      template_chat: 3
                      generate_template: 6
        '401':
          description: Unauthorized (code `unauthorized`)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MarketingAiError'
        '500':
          description: >-
            Credit status unavailable (codes `ai_credit_error`,
            `ai_migration_required`, `ai_plan_not_configured`)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MarketingAiError'
components:
  schemas:
    MarketingAiCredits:
      type: object
      description: >-
        AI credit wallet for the authenticated owner, for the current monthly
        UTC cycle.
      properties:
        available:
          type: boolean
          description: False when the plan carries no AI grant, so no wallet exists yet.
        planLevel:
          type: integer
          description: Marketing plan level; 0 is free.
        monthlyCredits:
          type: integer
          description: Credits granted per cycle by the plan.
        granted:
          type: integer
        reserved:
          type: integer
          description: Credits held by generations that are still in flight.
        consumed:
          type: integer
        remaining:
          type: integer
          description: >-
            granted - reserved - consumed. A request needs at least its cost
            here.
        cycleKey:
          type: string
          example: 2026-08
        cycleEndsAt:
          type: integer
          description: Unix seconds
        blocked:
          type: boolean
          description: True when AI is disabled for this account by an operator.
        blockedReason:
          type: string
    MarketingAiError:
      type: object
      properties:
        success:
          type: boolean
          example: false
        error:
          type: string
          description: Human-readable message, safe to display.
        code:
          type: string
          description: Stable machine-readable code. Branch on this, not on the message.
          example: ai_credits_exhausted
  securitySchemes:
    apiKeyAuth:
      type: http
      scheme: bearer
      description: API key for account management endpoints. Use your api_ prefixed token.

````