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 (requires subscription)
client.download_mix(created.project.id, "mix.wav")

# Delete a project to free a slot on the free plan
client.delete_project(created.project.id)

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
delete_project(project_id) Delete project and its files
wait_for_completion(project_id, …) Poll until done
get_mix_download(project_id) Presigned download URL (subscription required)
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.

Free accounts are limited to 3 AI mix projects. Downloading finished mixes requires an active subscription.

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.2.tar.gz (11.1 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.2-py3-none-any.whl (11.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cyphr_sdk-0.1.2.tar.gz
  • Upload date:
  • Size: 11.1 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.2.tar.gz
Algorithm Hash digest
SHA256 bd7f3ef42b2c425a1d0b1ca6d5c67d42844477938ecfacfb138cff64e78ad5d7
MD5 988ac964a3241528a628cd22d61f2f72
BLAKE2b-256 359d5845755f60312c74c9cba453d59462265416c0a98a05bb430ac2ef03dfbc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cyphr_sdk-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 11.3 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ef345ee8166ce6df070f796a407ad22f9b3c81ada9e9c3dc8eba29650b2af5d5
MD5 384af3e5bea6e4fbfe19100327aec744
BLAKE2b-256 42c249f57c2dfb4451bbabb6de9b76b9eb5a5da741b08a5d35376e54e02398ad

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