본문으로 건너뛰기

SDK API

Guide documentation for using the SDK. For detailed API references, see the Developer Guides.

Overview

The SDK API is organized into the following main sections:

Clients

Client classes for interacting with backend services and agents.

  • Guide - Usage examples and best practices for BackendClient, AgentClient, RayClient
  • Mixins - Specialized functionality (Annotation, DataCollection, HITL, ML, Integration)

Plugins

Plugin system API for building custom actions and integrations.

  • API - Plugin models, categories, datasets, and utilities

Quick Reference

Creating a Client

from synapse_sdk.clients.backend import BackendClient

client = BackendClient(
base_url="https://api.synapse.sh",
api_token="your-api-token"
)

Using Plugin Actions

from synapse_sdk.plugins.actions.train import TrainAction

class MyTrainAction(TrainAction):
def run(self):
# Your training logic here
pass

File Operations

from synapse_sdk.utils.file import archive, checksum

# Create archive
archive.create_zip("/path/to/source", "/path/to/output.zip")

# Verify checksum
checksum.verify_md5("/path/to/file", expected_hash)

Documentation Structure

SectionDescriptionUse When
GuideHigh-level usage patterns and examplesLearning how to use a feature
MixinsSpecialized client functionalityUnderstanding specific capabilities
APIPlugin system interfacesBuilding custom plugins