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

# API Overview

> Ping the API to check if the API key is valid.

## Getting Started

You can access Lotus's API directly or through one of our SDKs. We highly recommend using the SDKs as they provide a more user-friendly interface and can help you more easily interpret the return types.

If you're not using an SDK, all API calls must be made over https to `api.uselotus.io/api/`

### How to use your API key

To obtain an API key, you must navigate to Settings > Developer Settings > API Keys in the Lotus frontend. You can create a new API key by clicking the Add API Key button, where you'll be prompted to give it a name and an optional expiration date.

<img src="https://mintlify.s3.us-west-1.amazonaws.com/lotus/images/api-overview/api_keys.png" alt="API Key Creation page" />

The full API key will only be shown once, so make sure to copy it somewhere safe. You can always delete or regenerate the API key if you need to.

The API key must be passed into the *X-API-KEY* header in your requests.

To confirm that your API key is working, you can make a request to the */api/ping* endpoint. This will return the `organization_id` the API key belongs to.

<CodeGroup>
  ```py Python theme={null}
  lotus.ping()
  ```

  ```ts Typescript theme={null}
  await lotus.ping();
  ```
</CodeGroup>


## OpenAPI

````yaml GET /api/ping/
openapi: 3.0.3
info:
  title: Lotus API
  version: 0.9.3
  description: >-
    Lotus is an open-core pricing and billing engine. We enable API companies to
    automate and optimize their custom usage-based pricing for any metric.
servers: []
security: []
paths:
  /api/ping/:
    get:
      tags:
        - api
      description: Ping the API to check if the API key is valid.
      operationId: api_ping_retrieve
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConfirmConnected'
              examples:
                ConfirmConnected:
                  value:
                    organization_id: org_088c5d194bef40ed9aaeb72d42bd7945
                  summary: Example response for ConfirmConnected
          description: ''
      security:
        - knoxTokenAuth: []
        - OrganizationApiKeyAuth: []
          TokenAuth: []
components:
  schemas:
    ConfirmConnected:
      type: object
      properties:
        organization_id:
          type: string
      required:
        - organization_id
  securitySchemes:
    knoxTokenAuth:
      type: apiKey
      in: header
      name: Authorization
      description: Token-based authentication with required prefix "Token"
    OrganizationApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY

````