Skip to main content

Official Python SDK for the Cyphr AI mixing API

Project description

Cyphr Python SDK

Official client for the Cyphr AI mixing API. Upload stems, run an automated AI mix, and download the finished WAV — all from Python.

Install

pip install cyphr-sdk

Requires Python 3.9+.

Authentication

  1. Sign in at cyphrmusic.com.
  2. Open Account → API keys and create a key (cyphr_sk_…).
  3. Pass it to the client or set CYPHR_API_KEY.

The account page also shows the API base URL to use with base_url= or CYPHR_API_BASE_URL.

Quick start

from pathlib import Path
from cyphr import CyphrClient, StemSpec

client = CyphrClient(api_key="cyphr_sk_…")

mix_path = client.mix_project(
    title="My Song",
    stems=[
        StemSpec("vocals.wav", "vox_lead", Path("vocals.wav")),
        StemSpec("beat.wav", "multiple_instruments", Path("beat.wav")),
    ],
    output_path="mix.wav",
)
print("Downloaded:", mix_path)

Step-by-step workflow

Use this when you want control over uploads or status polling:

from cyphr import CyphrClient

client = CyphrClient(api_key="cyphr_sk_…")

# 1. Create project — returns presigned upload URLs
created = client.create_project(
    title="My Song",
    stems=[
        {"filename": "vocals.wav", "trackType": "vox_lead"},
        {"filename": "beat.wav", "trackType": "multiple_instruments"},
    ],
)

# 2. Upload each stem (PUT to presigned URL; headers must match)
for upload, path in zip(created.uploads, ["vocals.wav", "beat.wav"]):
    client.upload_stem(upload, path)

# 3. Queue for mixing
client.queue_project(created.project.id)

# 4. Wait until status is "completed"
project = client.wait_for_completion(created.project.id)
print(project.status)

# 5. Download the mix WAV
client.download_mix(created.project.id, "mix.wav")

Configuration

Setting Environment variable Constructor kwarg
API key CYPHR_API_KEY api_key=
API base URL CYPHR_API_BASE_URL base_url=
# Explicit configuration
client = CyphrClient(
    api_key="cyphr_sk_…",
    base_url="https://your-api-url.lambda-url.us-east-1.on.aws",
    timeout=60.0,  # HTTP timeout in seconds
)

If base_url is omitted, the SDK uses its built-in production URL when set, otherwise the dev API URL shipped with the package.

Track types

Every stem needs a trackType when creating a project:

Value Use for
vox_lead Lead vocal
vox_back Backing vocals / harmonies
multiple_instruments Full beat or multi-instrument stem
bass Bass line
808 808 / sub bass
drum_kit Full drum mix
kick Kick drum
snare Snare / clap
hi_hat_cymbals Hats / cymbals
keys Piano / synth keys
guitar Guitar
sfx Risers, sweeps, FX
multi_normalize Already-processed stem (normalize only)

Supported audio formats: .wav, .flac, .mp3, .m4a, .aiff, .aif

API reference

CyphrClient

Method Description
verify() Check API key; returns { "userId": "…" }
list_projects() List AI mix projects
create_project(title, stems, genre=None) Create project + presigned upload URLs
upload_stem(upload, source) Upload one stem file
queue_project(project_id) Start mixing after uploads
get_project(project_id) Get project status
wait_for_completion(project_id, …) Poll until done
get_mix_download(project_id) Presigned download URL
download_mix(project_id, dest=None) Download WAV to disk
mix_project(title, stems, …) End-to-end helper

Types

  • StemSpec(filename, track_type, source) — local file to upload in mix_project
  • Projectid, title, status, mix_status, …
  • StemUpload — presigned upload target from create_project
  • MixDownload — presigned download URL from get_mix_download

Exceptions

  • CyphrConfigError — missing API key or invalid client setup
  • CyphrApiError — API returned an error (status_code, body)
  • TimeoutErrorwait_for_completion exceeded its timeout

In Python: help(CyphrClient) for full method documentation.

Project statuses

Typical flow: uploadingqueuedpendingcompleted

If classification needs manual review in the app, status may become awaiting-review. Failed mixes return failed.

License

MIT

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

cyphr_sdk-0.1.1.tar.gz (10.8 kB view details)

Uploaded Source

Built Distribution

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

cyphr_sdk-0.1.1-py3-none-any.whl (11.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cyphr_sdk-0.1.1.tar.gz
  • Upload date:
  • Size: 10.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.13

File hashes

Hashes for cyphr_sdk-0.1.1.tar.gz
Algorithm Hash digest
SHA256 dfc16f91aec06adf4f733a0c663d30ac92da3e189659bb93e37ec96060d80a5a
MD5 a775f1d7448da3bab7d2ce4177dd1839
BLAKE2b-256 d1525c281b0cbd2db77eb57b7e07b17d6e64766cd25cb0b1021608c2f16e3974

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cyphr_sdk-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 11.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.13

File hashes

Hashes for cyphr_sdk-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 40125df99118cb30bec3680e495313b18e627570455f7fe6b756381165ca1f98
MD5 a7c5da21d1608f1a22e518795e644bab
BLAKE2b-256 896eeb5c7d4439688c0224fa675abf7e8f35c2d4737283096f7f624fbdfd8f5d

See more details on using hashes here.

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