SDK Quickstart
1. Install
Section titled “1. Install”Confirm the local runtime first: TypeScript SDK requires Node.js 18.17+, and Python SDK requires Python 3.10+. After installation, import the Python package as seacloud_sdk.
pnpm add @seacloudai/sdkpip install seacloudai-sdk2. Create A Client
Section titled “2. Create A Client”The caller must pass the API key explicitly. Your application may read it from an environment variable first, but the SDK does not do that automatically.
import { SeaCloud, getSeaCloudDocs } from "@seacloudai/sdk";
const docs = getSeaCloudDocs();
const client = new SeaCloud({ apiKey: process.env.SEACLOUD_API_KEY!, timeout: 600_000,});
console.table(docs.methods);import os
from seacloud_sdk import SeaCloud, getSeaCloudDocs
docs = getSeaCloudDocs()
client = SeaCloud( api_key=os.environ["SEACLOUD_API_KEY"], timeout=600_000,)
print(docs["methods"])3. Send Chat
Section titled “3. Send Chat”const text = await client.chat.send( "gpt-4.1", [{ role: "user", content: "Introduce SeaCloud SDK in one sentence." }], { temperature: 0.2, maxTokens: 128 },);
console.log(text);text = await client.chat.send( "gpt-4.1", [{"role": "user", "content": "Introduce SeaCloud SDK in one sentence."}], {"temperature": 0.2, "maxTokens": 128},)
print(text)4. Run Generation
Section titled “4. Run Generation”run creates a task and returns immediately. runSync and run_sync create a task, poll status, read the final response, and return a normalized result.
const result = await client.runSync("wan25_t2i_preview", { prompt: "a cinematic photo of a cat astronaut", n: 1, prompt_extend: true, size: "1024*1024", watermark: false,});
console.log(result.output?.urls);result = await client.run_sync("wan25_t2i_preview", { "prompt": "a cinematic photo of a cat astronaut", "n": 1, "prompt_extend": True, "size": "1024*1024", "watermark": False,})
print(result.get("output", {}).get("urls"))- For
dryRun, polling, model specs, and errors, continue to the operation manual.