Multimodal runs
Use the same client for image, video, audio, 3D, and language models.
const result = await client.runSync(modelId, params); const task = await client.run(modelId, params);
Unified API for LLM, image, video, audio, and 3D models. Returns structured data you can process. TypeScript and Python support.
npm install @seacloudai/sdkCode Examples
import { SeaCloud } from '@seacloudai/sdk';
const client = new SeaCloud({
apiKey: process.env.SEACLOUD_API_KEY
});
// Wait for the result
const result = await client.runSync('wan25_t2i_preview', {
prompt: 'a photorealistic orange tabby cat by a sunny window',
size: '1024*1024',
n: 1
});
console.log(result.output?.urls[0]);
console.log(result.status); // "completed"Core Features
Use the same client for image, video, audio, 3D, and language models.
const result = await client.runSync(modelId, params); const task = await client.run(modelId, params);
Browse available models and query parameter specs before making calls.
const models = await client.models.list({ type: 'video' });
const spec = await client.models.getSpec('wan25_t2i_preview');Search and install creative skills from the marketplace.
const skills = await client.skills.find('video generation');
const list = await client.skills.list();Bundled method references work without network access. Built for agent environments.
import { getSeaCloudDocs } from '@seacloudai/sdk';
const docs = getSeaCloudDocs();
console.log(docs.methods);
console.log(docs.operationManual.content);How It Works
Create a client with your API key and optional timeout.
const client = new SeaCloud({
apiKey: 'sk-...',
timeout: 600_000
});Choose sync for immediate results or async for long-running tasks.
const result = await client.runSync(modelId, params); const task = await client.run(modelId, params);
Read structured output with URLs, raw responses, and task status.
if (status.status === 'completed') {
const result = await client.tasks.getResponse(task.id, {
responseUrl: status.responseUrl
});
}// 1. Create a job
const task = await client.run('kling_v2_6_i2v', {
prompt: 'a cat running on the beach',
duration: 5
});
console.log(task.id, task.statusUrl);
// 2. Check status
const status = await client.tasks.get(task.id, {
statusUrl: task.statusUrl
});
// 3. Read the response
if (status.status === 'completed') {
const result = await client.tasks.getResponse(task.id, {
responseUrl: status.responseUrl
});
console.log(result.output?.urls);
}Method Reference
Method
Send messages to a language model and receive text responses.
const text = await client.chat.send('gpt-4.1', [
{ role: 'user', content: 'Explain quantum computing in three sentences' }
]);
console.log(text);Use Cases
Integrate multimodal generation into web apps, batch workflows, and agent pipelines.
Add AI generation to your API routes and return results to the frontend.
// Express route
app.post('/api/generate', async (req, res) => {
const result = await client.runSync('wan25_t2i_preview', {
prompt: req.body.prompt,
size: '1024*1024'
});
res.json({ imageUrl: result.output?.urls[0] });
});Process multiple prompts in sequence and save outputs to your system.
const prompts = await loadPrompts('prompts.csv');
for (const prompt of prompts) {
const result = await client.runSync('model_id', { prompt });
await saveToDatabase(result.output?.urls[0]);
}Chain multiple models together to build complex generation workflows.
const description = await client.chat.send('gpt-4.1', messages);
const image = await client.runSync('wan25_t2i_preview', {
prompt: description
});
const video = await client.run('kling_v2_6_i2v', {
image: image.output?.urls[0],
prompt: 'add motion'
});Install the SDK and start calling multimodal models from your code.