openapi: 3.0.1 info: title: AI Gateway API version: '1.0' servers: - url: https://api.us-east-1.langdb.ai description: LangDB API Server paths: /pricing: get: operationId: getPricing tags: - Pricing summary: Retrieve pricing information description: Returns the pricing details for LangDB services. responses: '200': description: Successful retrieval of pricing information content: application/json: schema: $ref: '#/components/schemas/ModelPricing' /projects/{project_id}/custom_prices: post: operationId: setCustomPrices tags: - Models - Pricing summary: 'Set custom prices for imported models' description: 'Set custom pricing for models imported from providers like Bedrock, Azure, Vertex that do not have built-in pricing' security: - BearerAuth: [] parameters: - name: project_id in: path required: true description: 'UUID of the project' schema: type: string format: uuid example: 25a0b7d9-86cf-448d-8395-66e9073d876f requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CustomPricesRequest' responses: '200': description: 'Custom prices set successfully' content: application/json: schema: $ref: '#/components/schemas/CustomPricesResponse' /models: get: operationId: listModels tags: - Models summary: List models responses: '200': description: OK content: application/json: schema: type: object properties: object: type: string description: "Type of the response, e.g. 'list'." example: list data: type: array description: "Array of model objects." items: type: object properties: id: type: string description: "Unique identifier for the model." example: o1-mini object: type: string description: "Object type, typically 'model'." example: model created: type: integer description: "Unix timestamp when the model was created." example: 1686935002 owned_by: type: string description: "Owner of the model." example: openai components: securitySchemes: BearerAuth: type: http scheme: bearer schemas: ModelPricing: type: object properties: model: type: string example: gpt-3.5-turbo-0125 provider: type: string example: openai price: $ref: '#/components/schemas/PriceDetails' input_formats: type: array items: type: string example: ["text"] output_formats: type: array items: type: string example: ["text"] capabilities: type: array items: type: string example: ["tools"] type: type: string example: completions limits: $ref: '#/components/schemas/UsageLimits' PriceDetails: type: object properties: per_input_token: type: number format: float example: 0.5 per_output_token: type: number format: float example: 1.5 valid_from: type: string format: date-time nullable: true example: null UsageLimits: type: object properties: max_context_size: type: integer example: 16385 CustomPricesRequest: type: object description: 'Request body for setting custom prices on imported models' additionalProperties: $ref: '#/components/schemas/ModelPricingDetails' example: "bedrock/twelvelabs.pegasus-1-2-v1:0": per_input_token: 1.23 per_output_token: 2.12 ModelPricingDetails: type: object required: - per_input_token - per_output_token properties: per_input_token: type: number format: float description: 'Price per input token' example: 1.23 per_output_token: type: number format: float description: 'Price per output token' example: 2.12 CustomPricesResponse: type: object description: 'Custom pricing for imported models' additionalProperties: $ref: '#/components/schemas/ModelPricingDetails' example: "bedrock/ai21.jamba-1-5-large-v1:0": per_input_token: 1.23 per_output_token: 2.12