For developers

The same catalogue over plain HTTP, for when generation is part of your product rather than part of your chat.

Install

bash
npm i @sequelsh/core
ts
import { Sequel } from '@sequelsh/core';

const sequel = new Sequel({ apiKey: process.env.SEQUEL_API_KEY });

const task = await sequel.run({
  model: 'black-forest-labs/flux-1-schnell',
  prompt: 'a ceramic mug on seamless white',
});

console.log(task.task.assets?.[0]?.url);

Create a key in Settings → API Keys. The SDK reads SEQUEL_API_KEY when you do not pass one.

Give your own agent the tools

If you are building an agent rather than calling models yourself, the catalogue ships as Vercel AI SDK tools. Your model searches, reads a schema and generates, the same three calls an MCP client makes — except inside your app, on your key.

bash
npm i @sequelsh/core @sequelsh/ai-sdk ai
ts
import { anthropic } from '@ai-sdk/anthropic';
import { AISDKToolset } from '@sequelsh/ai-sdk';
import { Sequel } from '@sequelsh/core';
import { generateText, stepCountIs } from 'ai';

const sequel = new Sequel({
  apiKey: process.env.SEQUEL_API_KEY,
  toolset: new AISDKToolset(),
});

const { text } = await generateText({
  model: anthropic('claude-sonnet-5-5'),
  // search_models, get_model_schemas, run_models
  tools: await sequel.tools(),
  stopWhen: stepCountIs(8),
  prompt: 'Four product shots of a ceramic vase, warm side light. Keep it cheap.',
});

tools() returns the three discovery tools by default, so the prompt costs the same whether the catalogue holds twenty models or a thousand. When the list is short and fixed, mode: 'per-model' gives one typed tool per model instead:

ts
const tools = await sequel.tools({
  type: 'image',
  mode: 'per-model',
});
// generate_cf_black_forest_labs_flux_1_schnell, with that model's own schema

Per-model puts every schema in the prompt, which is fine for three models and expensive for twenty. SDK reference has the full options.

Give your coding agent the rules

Paste this into whichever agent is writing the code, so it stops guessing at parameter names and reads the schema instead.

System prompt — paste into your agent
You are helping write code against Sequel, a single API for image, video and audio generation models.

Install:
  npm i @sequelsh/core @sequelsh/ai-sdk

Client:
  import { Sequel } from '@sequelsh/core';
  const sequel = new Sequel({ apiKey: process.env.SEQUEL_API_KEY });

Rules that are easy to get wrong:

- params is the model's OWN input object. Most models take { prompt }, but
  text-to-speech takes { text }. Never assume prompt.
- Never invent a model id. Get them from sequel.search(), and call
  sequel.schema(id) when unsure of a field name.
- Image and audio finish inside the call. Video returns status 'in_progress'
  with a task id — await handle.wait() in a script, or take the webhook in
  production.
- Reference images are passed as URLs. Upload with sequel.upload(file) and
  pass the returned URL; the server fetches and encodes it for providers that
  want base64.
- Cost comes back on the task. It is an estimate for token-billed models.

Core calls:
  await sequel.search({ query, type })        // 'image' | 'video' | 'audio'
  await sequel.schema(modelId)
  await sequel.run({ model, params })         // or { model, prompt }
  await sequel.runMany([{ ... }, { ... }])
  await sequel.tasks.get(id)
  await sequel.tasks.list({ status, models })
  await sequel.upload(file)

Agent tools (Vercel AI SDK):
  import { AISDKToolset } from '@sequelsh/ai-sdk';
  const sequel = new Sequel({ apiKey, toolset: new AISDKToolset() });
  const tools = await sequel.tools();                     // 3 discovery tools
  const tools = await sequel.tools({ type: 'image', mode: 'per-model' });

Prefer discovery mode unless the model list is short and fixed; per-model mode
puts every model's schema in the prompt.

Where to go next