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

# Credits

> Returns the number of API credits remaining.



## OpenAPI

````yaml https://www.mrcook.app/api/business/openapi.json get /v1/credits
openapi: 3.1.0
info:
  title: Mr. Cook API
  version: 1.0.0
  description: API for integrating recipe generation into your products
  contact:
    email: feedback@mrcook.app
  termsOfService: https://www.mrcook.app/legal/api-terms
servers:
  - url: https://api.mrcook.app
    description: Production API
security: []
paths:
  /v1/credits:
    get:
      summary: Credits
      description: Returns the number of API credits remaining.
      responses:
        '200':
          description: Successfully retrieved remaining credits.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
                    properties:
                      credits:
                        type: object
                        properties:
                          remaining:
                            type: number
                            description: The number of API credits remaining
                            example: 42
                        required:
                          - remaining
                    required:
                      - credits
                required:
                  - success
                  - data
        '401':
          description: >-
            Invalid or missing API key. Learn more:
            https://docs.mrcook.app/business-api/api-key
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: UNAUTHORIZED
                  message:
                    type: string
                    example: >-
                      Invalid or missing API key. Learn more:
                      https://docs.mrcook.app/business-api/api-key
                required:
                  - code
                  - message
        '403':
          description: You don't have permission to access this resource.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: FORBIDDEN
                  message:
                    type: string
                    example: You don't have permission to access this resource.
                required:
                  - code
                  - message
        '429':
          description: >-
            Rate limit exceeded. Please contact support if you need a higher
            limit.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: TOO_MANY_REQUESTS
                  message:
                    type: string
                    example: >-
                      Rate limit exceeded. Please contact support if you need a
                      higher limit.
                required:
                  - code
                  - message
        '500':
          description: Internal server error. Please try again later or contact support.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INTERNAL_ERROR
                  message:
                    type: string
                    example: >-
                      Internal server error. Please try again later or contact
                      support.
                required:
                  - code
                  - message
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: 'How to get your API key: https://docs.mrcook.app/business-api/api-key'

````