Metadata-Version: 2.4
Name: gpuai-sdk
Version: 0.2.0
Summary: GPU.ai Public Developer API
Home-page: 
Author: GPU.ai Support
Author-email: "GPU.ai Support" <support@gpu.ai>
License: Apache-2.0
Project-URL: Repository, https://github.com/gpuai-dev/gpuai-python-sdk
Keywords: OpenAPI,OpenAPI-Generator,GPU.ai Public Developer API
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: urllib3<3.0.0,>=2.6.3
Requires-Dist: python-dateutil>=2.8.2
Requires-Dist: pydantic>=2.11
Requires-Dist: typing-extensions>=4.7.1
Dynamic: author
Dynamic: license-file

# gpuai-sdk
Programmatic API for GPU.ai. Authenticate with API keys minted from
the dashboard. See https://gpu.ai/docs for details.


This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

- API version: 1.0.0
- Package version: 0.2.0
- Generator version: 7.24.0
- Build package: org.openapitools.codegen.languages.PythonClientCodegen

## Requirements.

Python 3.10+

## Installation & Usage
### pip install

Install from PyPI with `pip install gpuai-sdk`, or straight from the public source mirror:

```sh
pip install git+https://github.com/gpuai-dev/gpuai-python-sdk.git
```
(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/gpuai-dev/gpuai-python-sdk.git`)

Then import the package:
```python
import gpuai_sdk
```

### Setuptools

Install from a mirror checkout (run from the checkout root):

```sh
pip install --user .
```
(or `sudo pip install .` to install the package for all users)

Then import the package:
```python
import gpuai_sdk
```

### Tests

Execute `pytest` to run the tests.

## Getting Started

Please follow the [installation procedure](#installation--usage) and then run the following:

```python

import os

import gpuai_sdk
from gpuai_sdk.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.gpu.ai/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = gpuai_sdk.Configuration(
    host = "https://api.gpu.ai/v1"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization (gpuai_live_<24-base62>): bearerAuth
configuration = gpuai_sdk.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)


# Enter a context with an instance of the API client
with gpuai_sdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = gpuai_sdk.BillingApi(api_client)

    try:
        # Get the org spending limit
        api_response = api_instance.get_spending_limit()
        print("The response of BillingApi->get_spending_limit:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling BillingApi->get_spending_limit: %s\n" % e)

```

## Documentation for API Endpoints

All URIs are relative to *https://api.gpu.ai/v1*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*BillingApi* | [**get_spending_limit**](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/BillingApi.md#get_spending_limit) | **GET** /billing/spending-limit | Get the org spending limit
*BillingApi* | [**update_spending_limit**](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/BillingApi.md#update_spending_limit) | **PUT** /billing/spending-limit | Set the org spending limit
*CommunityApi* | [**delist_community_machine**](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/CommunityApi.md#delist_community_machine) | **POST** /community/machines/{id}/delist | Delist a Community Cloud machine
*CommunityApi* | [**enable_community_supplier**](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/CommunityApi.md#enable_community_supplier) | **POST** /community/suppliers | Enable the Community Cloud supplier role
*CommunityApi* | [**get_community_earnings**](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/CommunityApi.md#get_community_earnings) | **GET** /community/earnings | Get your Community Cloud earnings
*CommunityApi* | [**get_community_machine**](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/CommunityApi.md#get_community_machine) | **GET** /community/machines/{id} | Get one of your Community Cloud machines
*CommunityApi* | [**get_community_supplier_me**](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/CommunityApi.md#get_community_supplier_me) | **GET** /community/suppliers/me | Get the caller&#39;s Community Cloud supplier
*CommunityApi* | [**list_community_machines**](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/CommunityApi.md#list_community_machines) | **GET** /community/machines | List your Community Cloud machines
*CommunityApi* | [**reclaim_community_machine**](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/CommunityApi.md#reclaim_community_machine) | **POST** /community/machines/{id}/reclaim | Reclaim a spot-tier Community Cloud machine
*CommunityApi* | [**register_community_machine**](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/CommunityApi.md#register_community_machine) | **POST** /community/machines | Register a Community Cloud machine
*CommunityApi* | [**update_community_machine**](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/CommunityApi.md#update_community_machine) | **PATCH** /community/machines/{id} | Update a Community Cloud machine&#39;s price
*EnvironmentsApi* | [**get_environments**](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/EnvironmentsApi.md#get_environments) | **GET** /environments | List launch environments (no auth required)
*FineTuningApi* | [**cancel_fine_tuning_job**](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/FineTuningApi.md#cancel_fine_tuning_job) | **POST** /fine_tuning/jobs/{id}/cancel | Cancel a fine-tuning job (OpenAI-compatible)
*FineTuningApi* | [**create_file**](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/FineTuningApi.md#create_file) | **POST** /files | Upload a fine-tuning dataset file (OpenAI-compatible)
*FineTuningApi* | [**create_fine_tuning_job**](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/FineTuningApi.md#create_fine_tuning_job) | **POST** /fine_tuning/jobs | Create a managed fine-tuning job (OpenAI-compatible)
*FineTuningApi* | [**get_fine_tuning_job**](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/FineTuningApi.md#get_fine_tuning_job) | **GET** /fine_tuning/jobs/{id} | Retrieve a fine-tuning job (OpenAI-compatible)
*FineTuningApi* | [**list_fine_tuning_job_events**](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/FineTuningApi.md#list_fine_tuning_job_events) | **GET** /fine_tuning/jobs/{id}/events | List fine-tuning job events (OpenAI-compatible)
*FineTuningApi* | [**list_fine_tuning_jobs**](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/FineTuningApi.md#list_fine_tuning_jobs) | **GET** /fine_tuning/jobs | List fine-tuning jobs (OpenAI-compatible)
*GpuTypesApi* | [**list_gpu_types**](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/GpuTypesApi.md#list_gpu_types) | **GET** /gpu-types | List available GPU types (no auth required)
*InferenceApi* | [**cancel_video**](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/InferenceApi.md#cancel_video) | **POST** /videos/{id}/cancel | Cancel a video generation job
*InferenceApi* | [**create_chat_completion**](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/InferenceApi.md#create_chat_completion) | **POST** /chat/completions | Create a chat completion (OpenAI-compatible)
*InferenceApi* | [**create_image**](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/InferenceApi.md#create_image) | **POST** /images/generations | Create image (OpenAI-compatible)
*InferenceApi* | [**create_video**](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/InferenceApi.md#create_video) | **POST** /videos | Create a video generation job (async)
*InferenceApi* | [**get_model**](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/InferenceApi.md#get_model) | **GET** /models/{id} | Get a specific model (OpenAI-compatible)
*InferenceApi* | [**get_video**](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/InferenceApi.md#get_video) | **GET** /videos/{id} | Get a video generation job
*InferenceApi* | [**get_video_content**](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/InferenceApi.md#get_video_content) | **GET** /videos/{id}/content | Download a completed video artifact
*InferenceApi* | [**list_models**](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/InferenceApi.md#list_models) | **GET** /models | List available models (OpenAI-compatible)
*InferenceApi* | [**list_videos**](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/InferenceApi.md#list_videos) | **GET** /videos | List video generation jobs
*InstancesApi* | [**create_instance**](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/InstancesApi.md#create_instance) | **POST** /instances | Create an instance (async — returns 202 + Operation-Id header)
*InstancesApi* | [**delete_instance**](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/InstancesApi.md#delete_instance) | **DELETE** /instances/{id} | Terminate an instance (idempotent)
*InstancesApi* | [**get_instance**](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/InstancesApi.md#get_instance) | **GET** /instances/{id} | Get an instance
*InstancesApi* | [**list_instances**](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/InstancesApi.md#list_instances) | **GET** /instances | List instances
*InstancesApi* | [**update_instance**](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/InstancesApi.md#update_instance) | **PATCH** /instances/{id} | Update an instance (rename only in v1)
*MetaApi* | [**get_health**](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/MetaApi.md#get_health) | **GET** /health | Liveness probe
*MetaApi* | [**get_open_api_spec**](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/MetaApi.md#get_open_api_spec) | **GET** /openapi.json | OpenAPI 3.1 specification
*OperationsApi* | [**get_operation**](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/OperationsApi.md#get_operation) | **GET** /operations/{id} | Get an async operation status
*PricingApi* | [**list_pricing**](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/PricingApi.md#list_pricing) | **GET** /pricing | List pricing per GPU type + region (no auth required)
*SshKeysApi* | [**create_ssh_key**](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/SshKeysApi.md#create_ssh_key) | **POST** /ssh-keys | Create an SSH key
*SshKeysApi* | [**delete_ssh_key**](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/SshKeysApi.md#delete_ssh_key) | **DELETE** /ssh-keys/{id} | Delete an SSH key (idempotent — 404 on already-gone per D-07)
*SshKeysApi* | [**get_ssh_key**](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/SshKeysApi.md#get_ssh_key) | **GET** /ssh-keys/{id} | Get an SSH key
*SshKeysApi* | [**list_ssh_keys**](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/SshKeysApi.md#list_ssh_keys) | **GET** /ssh-keys | List SSH keys
*TemplatesApi* | [**get_template**](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/TemplatesApi.md#get_template) | **GET** /templates/{id} | Get one deployable application template
*TemplatesApi* | [**list_templates**](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/TemplatesApi.md#list_templates) | **GET** /templates | List deployable application templates
*UsageApi* | [**list_usage**](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/UsageApi.md#list_usage) | **GET** /usage | Time-bucketed usage
*WebhooksApi* | [**create_webhook_endpoint**](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/WebhooksApi.md#create_webhook_endpoint) | **POST** /webhook-endpoints | Create a webhook endpoint
*WebhooksApi* | [**delete_webhook_endpoint**](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/WebhooksApi.md#delete_webhook_endpoint) | **DELETE** /webhook-endpoints/{id} | Delete a webhook endpoint
*WebhooksApi* | [**get_webhook_endpoint**](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/WebhooksApi.md#get_webhook_endpoint) | **GET** /webhook-endpoints/{id} | Get a webhook endpoint
*WebhooksApi* | [**list_webhook_endpoints**](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/WebhooksApi.md#list_webhook_endpoints) | **GET** /webhook-endpoints | List webhook endpoints


## Documentation For Models

 - [ChatChoice](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/ChatChoice.md)
 - [ChatCompletionRequest](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/ChatCompletionRequest.md)
 - [ChatCompletionResponse](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/ChatCompletionResponse.md)
 - [ChatMessage](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/ChatMessage.md)
 - [CommunityEarnings](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/CommunityEarnings.md)
 - [CommunityEarningsEntry](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/CommunityEarningsEntry.md)
 - [CommunityMachine](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/CommunityMachine.md)
 - [CommunityMachineDelistResult](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/CommunityMachineDelistResult.md)
 - [CommunityMachineRegistration](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/CommunityMachineRegistration.md)
 - [CommunitySupplier](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/CommunitySupplier.md)
 - [CreateFineTuningJobRequest](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/CreateFineTuningJobRequest.md)
 - [CreateFineTuningJobRequestGpuai](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/CreateFineTuningJobRequestGpuai.md)
 - [CreateFineTuningJobRequestMethod](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/CreateFineTuningJobRequestMethod.md)
 - [CreateFineTuningJobRequestMethodLora](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/CreateFineTuningJobRequestMethodLora.md)
 - [CreateInstanceRequest](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/CreateInstanceRequest.md)
 - [CreateSshKeyRequest](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/CreateSshKeyRequest.md)
 - [CreateWebhookEndpointRequest](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/CreateWebhookEndpointRequest.md)
 - [Environments](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/Environments.md)
 - [FileObject](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/FileObject.md)
 - [FineTuningJob](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/FineTuningJob.md)
 - [FineTuningJobError](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/FineTuningJobError.md)
 - [FineTuningJobEvent](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/FineTuningJobEvent.md)
 - [FineTuningJobEventList](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/FineTuningJobEventList.md)
 - [FineTuningJobList](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/FineTuningJobList.md)
 - [FineTuningJobMethod](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/FineTuningJobMethod.md)
 - [FrameworkVersion](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/FrameworkVersion.md)
 - [GPUType](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/GPUType.md)
 - [GPUTypePage](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/GPUTypePage.md)
 - [GetHealth200Response](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/GetHealth200Response.md)
 - [ImagesGenerationsRequest](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/ImagesGenerationsRequest.md)
 - [ImagesResponse](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/ImagesResponse.md)
 - [ImagesResponseDataInner](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/ImagesResponseDataInner.md)
 - [ImagesResponseUsage](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/ImagesResponseUsage.md)
 - [IncludeItem](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/IncludeItem.md)
 - [Instance](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/Instance.md)
 - [InstanceConnection](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/InstanceConnection.md)
 - [InstancePage](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/InstancePage.md)
 - [ListCommunityMachines200Response](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/ListCommunityMachines200Response.md)
 - [Model](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/Model.md)
 - [ModelList](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/ModelList.md)
 - [ModelParametersInner](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/ModelParametersInner.md)
 - [ModelPricing](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/ModelPricing.md)
 - [OpenAIErrorEnvelope](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/OpenAIErrorEnvelope.md)
 - [OpenAIErrorEnvelopeError](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/OpenAIErrorEnvelopeError.md)
 - [Operation](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/Operation.md)
 - [OperationError](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/OperationError.md)
 - [OperationResult](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/OperationResult.md)
 - [Pricing](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/Pricing.md)
 - [PricingPage](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/PricingPage.md)
 - [Problem](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/Problem.md)
 - [RegisterCommunityMachineRequest](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/RegisterCommunityMachineRequest.md)
 - [SSHKey](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/SSHKey.md)
 - [SSHKeyPage](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/SSHKeyPage.md)
 - [SpendingLimit](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/SpendingLimit.md)
 - [StreamOptions](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/StreamOptions.md)
 - [SupplierMachineView](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/SupplierMachineView.md)
 - [Template](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/Template.md)
 - [TemplateEnvInner](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/TemplateEnvInner.md)
 - [TemplateList](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/TemplateList.md)
 - [TemplatePortsInner](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/TemplatePortsInner.md)
 - [UpdateCommunityMachineRequest](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/UpdateCommunityMachineRequest.md)
 - [UpdateInstanceRequest](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/UpdateInstanceRequest.md)
 - [UpdateSpendingLimitRequest](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/UpdateSpendingLimitRequest.md)
 - [Usage](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/Usage.md)
 - [UsageBucket](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/UsageBucket.md)
 - [UsagePage](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/UsagePage.md)
 - [VMImage](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/VMImage.md)
 - [VideoCreateRequest](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/VideoCreateRequest.md)
 - [VideoJob](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/VideoJob.md)
 - [VideoList](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/VideoList.md)
 - [WebhookEndpoint](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/WebhookEndpoint.md)
 - [WebhookEndpointPage](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/WebhookEndpointPage.md)


<a id="documentation-for-authorization"></a>
## Documentation For Authorization


Authentication schemes defined for the API:
<a id="bearerAuth"></a>
### bearerAuth

- **Type**: Bearer authentication (gpuai_live_<24-base62>)


## Author

support@gpu.ai


