DataCrunch Balance API

The Balance API from DataCrunch — 1 operation(s) for balance.

OpenAPI Specification

datacrunch-balance-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: DataCrunch Public Balance API
  description: Public REST API for DataCrunch, a European GPU cloud. The API lets you deploy and manage GPU/CPU instances, query instance types and real-time availability, manage OS images and startup scripts, SSH keys, block storage volumes, retrieve account balance, and deploy and operate serverless container deployments for inference. Authentication uses the OAuth 2.0 Client Credentials flow to obtain a short-lived Bearer access token.
  termsOfService: https://datacrunch.io/legal/terms-of-service
  contact:
    name: DataCrunch Support
    url: https://docs.datacrunch.io/
  version: '1.0'
servers:
- url: https://api.datacrunch.io/v1
security:
- bearerAuth: []
tags:
- name: Balance
paths:
  /balance:
    get:
      operationId: getBalance
      tags:
      - Balance
      summary: Get project account balance
      parameters:
      - name: currency
        in: query
        required: false
        schema:
          type: string
          example: usd
      responses:
        '200':
          description: Current balance.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Balance'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  responses:
    Unauthorized:
      description: Missing or invalid access token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    Balance:
      type: object
      properties:
        amount:
          type: number
          format: float
        currency:
          type: string
          example: usd
    Error:
      type: object
      properties:
        code:
          type: string
        message:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Bearer access token obtained from POST /oauth2/token via the OAuth 2.0 Client Credentials grant.