Skip to main content

Forward Compute API

Project description

Forward Compute SDK

Forward Compute API for managing machines, contracts, and compute resources

This Python package is automatically generated by the OpenAPI Generator project:

  • API version: 1.0.0
  • Package version: 0.1.1
  • Generator version: 7.18.0-SNAPSHOT
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen

Requirements.

Python 3.9+

Installation & Usage

pip install

If the python package is hosted on a repository, you can install directly using:

pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git)

Then import the package:

import fwd_sdk

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import fwd_sdk

Tests

Execute pytest to run the tests.

Getting Started

Please follow the installation procedure and then run the following:

import fwd_sdk
from fwd_sdk.rest import ApiException
from pprint import pprint

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

# 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 (JWT): bearerAuth
configuration = fwd_sdk.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)


# Enter a context with an instance of the API client
with fwd_sdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = fwd_sdk.AudioApi(api_client)
    create_speech_request = fwd_sdk.CreateSpeechRequest() # CreateSpeechRequest | 

    try:
        # Create speech from text
        api_response = api_instance.create_speech(create_speech_request)
        print("The response of AudioApi->create_speech:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling AudioApi->create_speech: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to https://app.forwardcompute.ai

Class Method HTTP request Description
AudioApi create_speech POST /v1/audio/speech Create speech from text
AudioApi create_transcription POST /v1/audio/transcriptions Create transcription from audio
AudioApi create_translation POST /v1/audio/translations Create translation from audio
AudioApi list_voices GET /v1/audio/voices List available TTS voices
ChatApi create_completion POST /v1/chat/completions Create chat completion
ChatApi get_completion GET /v1/chat/completions/{id} Get inference metadata
ChatApi list_completions GET /v1/chat/completions List inference history
ComputeApi get_offering GET /v1/spot/compute/offerings/{id} Get compute offering
ComputeApi list_offerings GET /v1/spot/compute/offerings List compute offerings
EmbeddingsApi create_embedding POST /v1/embeddings/ Create embeddings
ImagesApi create_image POST /v1/images/generations Generate images from a text prompt
InstancesApi create_instance POST /v1/spot/instances/ Create instance
InstancesApi delete_instance DELETE /v1/spot/instances/{id} Delete instance
InstancesApi get_instance GET /v1/spot/instances/{id} Get instance
InstancesApi list_instances GET /v1/spot/instances/ List instances
InstancesApi restart_instance POST /v1/spot/instances/{id}/restart Restart instance
ModelsApi list_models GET /v1/models/ List models
SSHKeysApi create_ssh_key POST /v1/spot/ssh-keys/ Create SSH key
SSHKeysApi delete_ssh_key DELETE /v1/spot/ssh-keys/{id} Delete SSH key
SSHKeysApi list_ssh_keys GET /v1/spot/ssh-keys/ List SSH keys
SupportApi contact POST /v1/support/ Submit support request
VolumesApi create_volume POST /v1/spot/volumes/ Create volume
VolumesApi delete_volume DELETE /v1/spot/volumes/{id} Delete volume
VolumesApi get_volume GET /v1/spot/volumes/{id} Get volume
VolumesApi get_volume_offering GET /v1/spot/volumes/offerings/{id} Get volume offering
VolumesApi list_volume_offerings GET /v1/spot/volumes/offerings List volume offerings
VolumesApi list_volumes GET /v1/spot/volumes/ List volumes

Documentation For Models

Documentation For Authorization

Authentication schemes defined for the API:

bearerAuth

  • Type: Bearer authentication (JWT)

Author

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fwd_sdk-0.1.1.tar.gz (103.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fwd_sdk-0.1.1-py3-none-any.whl (263.3 kB view details)

Uploaded Python 3

File details

Details for the file fwd_sdk-0.1.1.tar.gz.

File metadata

  • Download URL: fwd_sdk-0.1.1.tar.gz
  • Upload date:
  • Size: 103.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for fwd_sdk-0.1.1.tar.gz
Algorithm Hash digest
SHA256 2deb4e74f9236286f3383f49ea091912a21da9455eca81d8f8204ff9fab85e73
MD5 25292b44acf81270cd3e4e77dde79a04
BLAKE2b-256 0e256eb0240409be5fc58c25fae703cabfe61c975b6e96b04ea536feea85ae7b

See more details on using hashes here.

Provenance

The following attestation bundles were made for fwd_sdk-0.1.1.tar.gz:

Publisher: publish.yml on forwardcompute/python-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fwd_sdk-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: fwd_sdk-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 263.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for fwd_sdk-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a2c96767777bcb103546f9a06221906f0e6d440c04adf2dfeb13f225ca736537
MD5 0e9b3828ef341e3a3da17f3b8daebc5b
BLAKE2b-256 9fbb4b18b8cf0be1ebc30674da0e823d8ae280ca618f5aec676adc57565434a3

See more details on using hashes here.

Provenance

The following attestation bundles were made for fwd_sdk-0.1.1-py3-none-any.whl:

Publisher: publish.yml on forwardcompute/python-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page