> ## 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.

# Import Pricing

> Accepts a structured providers and models payload, or the SDK pricing_json object shape keyed by model type (chat, embeddings, and so on).

Bulk import used by **Import Pricing JSON** on Manage Models. Existing provider + model ID pairs are skipped.

```bash theme={null}
curl -X POST "/api/openground/models/import" \
  -H "Content-Type: application/json" \
  -H "Cookie: <signed-in-session-cookie>" \
  -d '{
    "providers": [
      {
        "providerId": "my-provider",
        "displayName": "My Provider",
        "description": "Custom LLM provider"
      }
    ],
    "models": [
      {
        "provider": "my-provider",
        "model_id": "my-model-v1",
        "displayName": "My Model v1",
        "inputPricePerMToken": 2.5,
        "outputPricePerMToken": 10
      }
    ]
  }'
```


## OpenAPI

````yaml POST /api/openground/models/import
openapi: 3.0.0
info:
  title: Manage Models - Import Pricing
  description: >-
    Bulk-import providers and models from structured JSON or SDK pricing_json.
    Skips existing provider+model_id pairs. Requires a signed-in OpenLIT
    session.
  version: 1.0.0
servers:
  - url: /
security:
  - sessionAuth: []
paths:
  /api/openground/models/import:
    post:
      summary: Import pricing JSON
      description: >-
        Accepts a structured providers and models payload, or the SDK
        pricing_json object shape keyed by model type (chat, embeddings, and so
        on).
      operationId: importModelsPricing
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                providers:
                  type: array
                  items:
                    type: object
                    properties:
                      providerId:
                        type: string
                      displayName:
                        type: string
                      description:
                        type: string
                models:
                  type: array
                  items:
                    type: object
                    properties:
                      provider:
                        type: string
                      model_id:
                        type: string
                      displayName:
                        type: string
                      inputPricePerMToken:
                        type: number
                      outputPricePerMToken:
                        type: number
      responses:
        '200':
          description: Import summary
          content:
            application/json:
              schema:
                type: object
                properties:
                  imported:
                    type: number
                  skipped:
                    type: number
                  providersImported:
                    type: number
                  providersSkipped:
                    type: number
        '401':
          description: Not signed in
components:
  securitySchemes:
    sessionAuth:
      type: apiKey
      in: cookie
      name: next-auth.session-token

````