Skip to main content

API And SDK

We provide a complete set of APIs and SDKs to facilitate interactions with our platform during development.

API

We have open APIs that you can use to create models, datasets and spaces. You can view our API documentation for more information.

Example of API usage:

curl --location 'https://hub.opencsg.com/api/v1/user/user_name_1/run/mode' --header 'Authorization: Bearer your_access_token'

SDK

The CSGHub SDK is a powerful Python client specifically designed to interact seamlessly with the CSGHub server. This toolkit is engineered to provide Python developers with an efficient and straightforward method to operate and manage remote CSGHub instances. Whether you're looking to automate tasks, manage data, or integrate CSGHub functionalities into your Python applications, the CSGHub SDK offers a comprehensive set of features to accomplish your goals with ease.

At CSGHub, you have the flexibility to manage models/datasets for your projects through both command-line interfaces and API interactions. Our platform is designed to support breakpoint resuming for downloads, ensuring that you can efficiently retrieve models or datasets even in the event of interrupted connections.

  1. Repository Downloads: Easily download a complete model/dataset repository from CSGHub, ensuring you have all the necessary components for your projects.
  2. Selective Downloads: Opt for downloading specific files from a model/dataset repository on CSGHub, allowing for targeted access to the components you need.
  3. Folder Uploads: Seamlessly upload entire folders to a model/dataset repository on CSGHub, simplifying the process of contributing your work to the community.
  4. File Uploads: Convenience is key, as CSGHub enables you to upload individual files to a model/dataset repository, facilitating incremental updates or additions.
  5. Pretrained Models Integration: Leverage the strength of CSGHub's SDK to easily load and run pretrained models available on CSGHub, enhancing your projects with state-of-the-art technology.
  6. Dataset Integration: Utilize the CSGHub SDK to incorporate datasets directly into your downstream tasks, streamlining your workflow and enabling seamless data manipulation.