CommonCompute
Get startedDownload the Mac app
Getting started

Your first job

The simplest possible job: embed a few strings.

python
job = cc.embeddings.create(
    model="bge-large-en-v1.5",
    inputs=["hello", "world"],
)
print(job.vectors[0][:5])

For anything larger than a handful of inputs, use the batch API — it streams and parallelises, and it's 3–6× cheaper than realtime pricing.

python
job = cc.embeddings.batch(
    model="bge-large-en-v1.5",
    inputs=open("docs.jsonl"),
    priority="batch",
    max_spend_usd=50,
)

for result in job.stream():
    db.upsert(result.id, result.vector)
Every batch job is priced before it runs. If the quote exceeds max_spend_usd, submission fails rather than silently billing.