Developer SDKs / v0.1
Your next
sandbox.
One TypeScript package for JavaScript and TypeScript. A matching Python client. Both use your Codegraff identity and shared purchased credits.
Start with your account.
Sign in with Codegraff and create a sandbox key. Store it as CONDENSATION_API_KEY in your server environment. Give each project a named key and a monthly budget.
JavaScript & TypeScript.
Node.js 20 or later. ESM and CommonJS are included, with TypeScript declarations.
npm install condensationaiimport { Condensation } from 'condensationai';
const client = new Condensation(); // CONDENSATION_API_KEY
const balance = await client.wallet();
console.log(balance.purchasedMicroUsd / 1_000_000);
const sandbox = await client.create({
language: 'python', autoStopMinutes: 5,
});
try {
const result = await client.run(sandbox.id, 'echo hello');
console.log(result.result);
} finally {
await client.delete(sandbox.id);
}Python.
Python 3.10 or later. The client uses the Python standard library and has no runtime dependencies.
pip install condensationaifrom condensationai import Condensation
client = Condensation() # CONDENSATION_API_KEY
sandbox = client.create(language='python', auto_stop_minutes=5)
try:
print(client.run(sandbox['id'], 'echo hello')['result'])
finally:
client.delete(sandbox['id'])One wallet. Clear eligibility.
Purchased credits are shared across Codegraff, nanohub, and Condensation. This first SDK release uses Codegraff’s existing sandbox gateway and its resource rates, which differ from the Condensation fleet rates shown on the pricing page. Monthly Condensation bonuses do not fund this gateway path.
Build checkout stays closed until bonus-credit metering is connected. Existing Codegraff top-ups still appear in the shared balance. Stopped sandboxes may incur storage charges; delete resources when finished.
Keys can manage the account’s sandboxes, including existing Codegraff sandboxes. They cannot call inference, access GitHub credentials or chat history, change billing, or use admin endpoints. Budgets are admission checks; concurrent or already-running work may exceed them.
Operations.
| Action | JavaScript / TypeScript | Python |
|---|---|---|
| Wallet | client.wallet() | client.wallet() |
| Create / list / get | create(), list(), get(id) | create(), list(), get(id) |
| Run a command | run(id, command) | run(id, command) |
| Background command | runAsync(id, command) | run(id, command, background=True) |
| Files | uploadBase64(), downloadBase64() | upload_base64(), download_base64() |
| Lifecycle | stop(), start(), delete() | stop(), start(), delete() |
| Usage | meter(id) | meter(id) |
Current gateway downloads are text-oriented; arbitrary binary file round trips are not guaranteed. Neither client automatically retries mutations. If a connection fails, check the resource state before repeating a create, command, or deletion.