Seekr Pricing API

The Pricing API from Seekr — 3 operation(s) for pricing.

OpenAPI Specification

seekr-pricing-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: SeekrFlow Pricing API
  description: SeekrFlow API Documentation
  termsOfService: http://www.seekr.com/support
  contact:
    name: Seekr API Support
    url: http://www.seekr.com/contact
    email: contact@seekr.com
  version: 5.108.1
servers:
- url: https://flow.seekr.com
  description: SeekrBuild server base URL
tags:
- name: Pricing
paths:
  /v1/flow/pricing/inference/serverless:
    post:
      tags:
      - Pricing
      summary: Generate Price Estimate For Serverless Inference
      description: 'Generates a price estimate for running inference using a base-model in a server-less deployment environment.

        **Note:** We currently only support inference for fine-tuned models in dedicated servers.


        ### Key Input Fields:


        - **pricing_estimate_request.deployment.model_id**: Used to fetch the model and determine the `model_size`, which influences the pricing multipliers applied in the calculation. Also used in logic in determining whether model deployed is a fine-tuned or base model.


        - **pricing_estimate_request.file_ids**: A list of file IDs used to pull files from S3 and parse them for token counts. These token counts will be used as `input_tokens` in the pricing equation, while `output_tokens` will use default values. If no `file_ids` are provided, `input_tokens` will default to predefined values.


        **Returns:** A JSON object with the price estimate.'
      operationId: generate_price_estimate_for_serverless_inference_v1_flow_pricing_inference_serverless_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PricingEstimateServerlessInferenceRequestModel'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PricingEstimateResponseModel'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - APIKeyHeader: []
      x-excluded: true
  /v1/flow/pricing/fine-tuning:
    post:
      tags:
      - Pricing
      summary: Generate Price Estimate For Finetuning
      description: "Generates a price estimate for applying a fine-tuning job for a given model.\n\n### Key input fields:\n- **pricing_estimate_request.deployment.model_id**: - used to fetch the model, and determine the model_size which in turn is used for calculating multipliers used in equations\n- **pricing_estimate_request.num_of_epochs**: - number of times training set is passed through model during training.\n    A direct input into the equation calculations\n\n**Returns:** A JSON object with the price estimate."
      operationId: generate_price_estimate_for_finetuning_v1_flow_pricing_fine_tuning_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PricingEstimateFineTuningRequestModel'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PricingEstimateResponseModel'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - APIKeyHeader: []
      x-excluded: true
  /v1/flow/pricing/inference/dedicated:
    post:
      tags:
      - Pricing
      summary: Generate Price Estimate For Dedicated Inference
      description: "Generates a price estimate for running inference using a base or fine-tuned model in a dedicated deployment environment.\nNote: We currently only support GAUDI2 for our hardware but recognize future use of A100, H100, GAUDI3 accelerator types.\nKey input fields:\n- **pricing_estimate_request.estimated_compute_hours**: - hours of total usage of the model. A direct input used in calculation\n    Also has a default if nothing is entered\n- **pricing_estimate_request.deployment.n_instances**: - instances of the hardware resource used. A direct input used in calculations\n- **pricing_estimate_request.deployment.hardware**: - used to calculate pricing multiplier based on the mapping (CPU, GPU, HPU) listed.\n    For the input value `GAUDI2` we actually bypass the mapping and set the multiplier by 1, because it is our default offering."
      operationId: generate_price_estimate_for_dedicated_inference_v1_flow_pricing_inference_dedicated_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PricingEstimateDedicatedInferenceRequestModel'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PricingEstimateResponseModel'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - APIKeyHeader: []
      x-excluded: true
components:
  schemas:
    PricingEstimateFineTuningRequestModel:
      properties:
        deployment:
          $ref: '#/components/schemas/NewDeploymentRequest'
        num_of_epochs:
          type: integer
          maximum: 2000
          minimum: 1
          title: Num Of Epochs
        file_ids:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: File Ids
      type: object
      required:
      - deployment
      - num_of_epochs
      title: PricingEstimateFineTuningRequestModel
    BillingType:
      type: string
      enum:
      - Fine-Tuning
      - Training
      - Inference
      title: BillingType
    PricingEstimateServerlessInferenceRequestModel:
      properties:
        deployment:
          $ref: '#/components/schemas/NewDeploymentRequest'
        file_ids:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: File Ids
      type: object
      required:
      - deployment
      title: PricingEstimateServerlessInferenceRequestModel
    NewDeploymentRequest:
      properties:
        model_type:
          $ref: '#/components/schemas/DeploymentType'
        model_id:
          type: string
          title: Model Id
        name:
          type: string
          maxLength: 100
          minLength: 5
          title: Name
        description:
          type: string
          maxLength: 1000
          minLength: 5
          title: Description
        n_instances:
          type: integer
          maximum: 50
          minimum: 1
          title: N Instances
        hardware:
          anyOf:
          - $ref: '#/components/schemas/AcceleratorType'
          - type: 'null'
      type: object
      required:
      - model_type
      - model_id
      - name
      - description
      - n_instances
      title: NewDeploymentRequest
    PricingEstimateDedicatedInferenceRequestModel:
      properties:
        deployment:
          $ref: '#/components/schemas/NewDeploymentRequest'
        estimated_compute_hours:
          anyOf:
          - type: integer
            maximum: 8760
            minimum: 1
          - type: 'null'
          title: Estimated Compute Hours
      type: object
      required:
      - deployment
      - estimated_compute_hours
      title: PricingEstimateDedicatedInferenceRequestModel
    AcceleratorType:
      type: string
      enum:
      - GAUDI2
      - GAUDI3
      - A100
      - A10
      - H100
      - MI300X
      title: AcceleratorType
    DeploymentType:
      type: string
      enum:
      - Fine-tuned Run
      - Base Model
      title: DeploymentType
    HardwareType:
      type: string
      enum:
      - Serverless
      - Dedicated
      title: HardwareType
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    CalculationParameter:
      properties:
        name:
          type: string
          title: Name
        description:
          type: string
          title: Description
        value:
          anyOf:
          - {}
          - type: 'null'
          title: Value
      type: object
      required:
      - name
      - description
      title: CalculationParameter
    PricingEstimateResponseModel:
      properties:
        status:
          type: integer
          title: Status
        pricing_estimate:
          type: number
          title: Pricing Estimate
        billing_type:
          $ref: '#/components/schemas/BillingType'
        resource_type:
          $ref: '#/components/schemas/HardwareType'
        created_at:
          type: string
          format: date-time
          title: Created At
        deployment:
          $ref: '#/components/schemas/NewDeploymentRequest'
        description:
          type: string
          title: Description
        tokens_used:
          anyOf:
          - type: integer
          - type: 'null'
          title: Tokens Used
        calculation_parameters:
          anyOf:
          - items:
              $ref: '#/components/schemas/CalculationParameter'
            type: array
          - type: 'null'
          title: Calculation Parameters
      type: object
      required:
      - status
      - pricing_estimate
      - billing_type
      - resource_type
      - created_at
      - deployment
      - description
      title: PricingEstimateResponseModel
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      description: Your Seekr API key, sent in the Authorization header with no 'Bearer' prefix.
      in: header
      name: Authorization