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

# Public pricing export

> Returns SDK-compatible pricing for all models in that database config. No auth. Cached for 5 minutes.

Public endpoint behind the **SDK Pricing URL** on Manage Models. No API key or session required.

Copy the URL from Manage Models (it includes your database config id), or call:

```bash theme={null}
curl -X GET "/api/pricing/export/<your-db-config-id>"
```

## SDK usage

Replace the host and database config id with values from your OpenLIT deployment and the Manage Models **SDK Pricing URL** bar.

<Tabs>
  <Tab title="Python">
    ```python theme={null}
    import openlit

    openlit.init(
        otlp_endpoint="http://<otel-collector-host>:4318",
        pricing_json="https://<your-openlit-host>/api/pricing/export/<your-db-config-id>",
    )
    ```
  </Tab>

  <Tab title="TypeScript">
    ```typescript theme={null}
    import openlit from "openlit";

    openlit.init({
      otlpEndpoint: "http://<otel-collector-host>:4318",
      pricingJson: "https://<your-openlit-host>/api/pricing/export/<your-db-config-id>",
    });
    ```
  </Tab>

  <Tab title="Go">
    ```go theme={null}
    package main

    import openlit "github.com/openlit/openlit/sdk/go"

    func main() {
        openlit.Init(openlit.Config{
            OtlpEndpoint: "http://<otel-collector-host>:4318",
            PricingJson:  "https://<your-openlit-host>/api/pricing/export/<your-db-config-id>",
        })
    }
    ```
  </Tab>
</Tabs>

<Warning>
  The path contains your database config id. The response is pricing only (no secrets or traces), but share the URL only with systems that should read your model prices.
</Warning>


## OpenAPI

````yaml GET /api/pricing/export/{dbConfigId}
openapi: 3.0.0
info:
  title: Public SDK Pricing Export
  description: >-
    Unauthenticated pricing.json export for a database configuration id. Safe to
    pass to OpenLIT SDK pricing_json / pricingJson.
  version: 1.0.0
servers:
  - url: /
security: []
paths:
  /api/pricing/export/{dbConfigId}:
    get:
      summary: Public pricing export
      description: >-
        Returns SDK-compatible pricing for all models in that database config.
        No auth. Cached for 5 minutes.
      operationId: publicPricingExport
      parameters:
        - name: dbConfigId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: pricing.json body
          content:
            application/json:
              schema:
                type: object
                example:
                  chat:
                    gpt-4o:
                      promptPrice: 0.0025
                      completionPrice: 0.01
        '404':
          description: Database config not found

````