ottoport 1.9.0 → 1.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ottoport",
3
3
  "description": "One API for every model. Call chat, image, video, speech and music models through the OttoPort gateway — as MCP tools, slash commands, or the bundled CLI.",
4
- "version": "1.9.0",
4
+ "version": "1.11.0",
5
5
  "author": {
6
6
  "name": "LITBOX LLC",
7
7
  "email": "support@ottoport.ai"
package/README.md CHANGED
@@ -84,13 +84,14 @@ it needs Node 20+ on the PATH of whatever starts that host.
84
84
 
85
85
  ### Modes and resolution
86
86
 
87
- Video takes four modes — text-to-video, image-to-video (`image_url`),
88
- first-and-last-frame (`image_url` + `last_frame_url`), and reference-to-video
89
- (`reference_image_urls`). Images take one reference (`image_url`) or several
87
+ Video takes five modes — text-to-video, image-to-video (`image_url`),
88
+ first-and-last-frame (`image_url` + `last_frame_url`), reference-to-video
89
+ (`reference_image_urls`), and Kling motion control (`image_url` + `video_url`:
90
+ the character performs the clip's movement). Images take one reference (`image_url`) or several
90
91
  (`reference_image_urls`). Both take a `resolution`: `480p`…`4k` for video,
91
92
  `1k`/`2k`/`4k` for images, and a tier above a model's base rate costs more.
92
93
 
93
- The GPT Image family reads a `quality` on top of that — `low`, `medium` (the
94
+ The GPT Image family and `ideogram-4.5` read a `quality` on top of that — `low`, `medium` (the
94
95
  default every catalog rate is measured at), `high`, and on `gpt-image-2.5` and
95
96
  `gpt-image-2.5-flare` also `xhigh` and `max`. It is how much compute the model
96
97
  spends, and the ladder is steep: `max` bills sixteen times `medium`.
package/cli/ottoport.mjs CHANGED
@@ -253,8 +253,8 @@ async function download(url, out) {
253
253
  * what a shell user reaches for anyway, so both spellings are accepted:
254
254
  * `--ref a.png --ref b.png` and `--ref a.png,b.png`.
255
255
  */
256
- function references(flags) {
257
- const raw = flags.ref ?? flags.reference;
256
+ function references(flags, name = "ref") {
257
+ const raw = name === "ref" ? flags.ref ?? flags.reference : flags[name];
258
258
  const list = (Array.isArray(raw) ? raw : [raw])
259
259
  .filter(Boolean)
260
260
  .flatMap((value) => String(value).split(",").map((one) => one.trim()))
@@ -308,6 +308,8 @@ async function cmdVideo(prompt, flags) {
308
308
  ...(last(flags.image) ? { image_url: flags.image } : {}),
309
309
  ...(last(flags["last-frame"]) ? { last_frame_url: flags["last-frame"] } : {}),
310
310
  ...(references(flags) ? { reference_image_urls: references(flags) } : {}),
311
+ ...(references(flags, "ref-video") ? { reference_video_urls: references(flags, "ref-video") } : {}),
312
+ ...(references(flags, "ref-audio") ? { reference_audio_urls: references(flags, "ref-audio") } : {}),
311
313
  ...webhook(flags),
312
314
  };
313
315
  console.error("submitting video job (this can take a minute)…");
@@ -410,7 +412,7 @@ async function cmdAudio(kind, prompt, flags) {
410
412
  const HELP = `OttoPort — one command for every model.
411
413
 
412
414
  Usage:
413
- ottoport models [--modality chat|image|video|tts|music] [--json]
415
+ ottoport models [--modality chat|image|video|tts|stt|music|embedding] [--json]
414
416
  ottoport models <model-id> [--json] what that one model accepts
415
417
  ottoport chat "<prompt>" [--model claude-sonnet-5] [--system "..."] [--no-stream]
416
418
  [--video <url|file>[,<url|file>…]] ask about a video
@@ -423,6 +425,7 @@ Usage:
423
425
  ottoport video "<prompt>" [--model kling-3.0] [--duration 5] [--resolution 1080p]
424
426
  [--aspect-ratio 16:9] [--seed 7] [--image <url>]
425
427
  [--last-frame <url>] [--ref <url>[,<url>…]]
428
+ [--ref-video <url>[,<url>…]] [--ref-audio <url>[,<url>…]]
426
429
  [--webhook-url https://…] [--webhook-secret <s>]
427
430
  [--no-wait] [--out clip.mp4]
428
431
  ottoport video --model video-depth-anything --video <url> [--out depth.mp4]
package/mcp/server.mjs CHANGED
@@ -218,7 +218,8 @@ async function generateImage({ prompt, model, ...rest }) {
218
218
 
219
219
  async function generateVideo({ prompt, model, webhook_url, webhook_secret, ...rest }) {
220
220
  // A depth model takes only `video_url`; the gateway says which models need a prompt.
221
- if (!prompt && !rest.video_url) throw new Error("`prompt` is required");
221
+ // A draft completion takes everything from its draft, the prompt included.
222
+ if (!prompt && !rest.video_url && !rest.draft_id) throw new Error("`prompt` is required");
222
223
  // The secret is best left in the server's environment, so an agent never has
223
224
  // to carry it through a conversation.
224
225
  const secret = webhook_secret || process.env.OTTOPORT_WEBHOOK_SECRET;
@@ -241,6 +242,8 @@ async function generateVideo({ prompt, model, webhook_url, webhook_secret, ...re
241
242
  const { job, timedOut, path } = await waitForJob(VIDEO_JOB_PATH, submitted, { timeoutMs: 10 * 60_000, label: "video" });
242
243
  if (timedOut) return `Video job ${job.id} is still processing. Poll ${path} for its result.`;
243
244
  const url = job.data?.[0]?.url;
245
+ // The draft's job id is what completes it, so it is worth saying.
246
+ if (url && rest.draft) return `${url}\nDraft ${job.id} — complete it at 1080p with draft_id "${job.id}" within seven days.`;
244
247
  return url || JSON.stringify(job);
245
248
  }
246
249
 
@@ -284,7 +287,7 @@ const TOOLS = [
284
287
  inputSchema: {
285
288
  type: "object",
286
289
  properties: {
287
- modality: { type: "string", enum: ["chat", "image", "video", "tts", "music"], description: "Filter to one modality." },
290
+ modality: { type: "string", enum: ["chat", "image", "video", "tts", "stt", "music", "embedding"], description: "Filter to one modality." },
288
291
  model: { type: "string", description: "A model id, e.g. veo-3.1. Returns that one model's full parameter list instead of the catalog." },
289
292
  },
290
293
  },
@@ -313,7 +316,7 @@ const TOOLS = [
313
316
  type: "object",
314
317
  properties: {
315
318
  prompt: { type: "string", description: "What to generate. On a layer-decomposition model, an optional caption of the input image." },
316
- model: { type: "string", description: "Model id, e.g. gpt-image-2, nano-banana-2, nano-banana-pro. Default gpt-image-2." },
319
+ model: { type: "string", description: "Model id, e.g. gpt-image-2, nano-banana-2.1, nano-banana-pro. Default gpt-image-2." },
317
320
  size: { type: "string", description: 'Exact pixels, e.g. "1024x1024". Wins over `resolution`.' },
318
321
  // No `enum`: the vocabulary is "1k"/"2k"/"4k", but which of them a given
319
322
  // model actually offers differs per model, and an enum here reads as a
@@ -322,7 +325,7 @@ const TOOLS = [
322
325
  // at best. The model's own menu is in `ottoport_list_models`.
323
326
  resolution: { type: "string", description: 'Output detail — "1k", "2k" or "4k", but only the tiers this model lists in ottoport_list_models. Priced accordingly. Pair with `aspect_ratio` when you know the shape but not the pixel vocabulary; an explicit `size` wins.' },
324
327
  aspect_ratio: { type: "string", description: 'e.g. "16:9". Read only when `size` is absent.' },
325
- quality: { type: "string", description: 'How much compute the model spends, on the GPT Image family only — "low", "medium" (the default), "high", and on gpt-image-2.5 "xhigh" and "max". Priced by tier, and the ladder is steep: `max` costs sixteen times `medium`. Check the model\'s `qualities` in ottoport_list_models.' },
328
+ quality: { type: "string", description: 'How much compute the model spends, on the GPT Image family and ideogram-4.5 — "low", "medium" (the default), "high", and on gpt-image-2.5 "xhigh" and "max". Priced by tier, and the ladder is steep: `max` costs sixteen times `medium`. Check the model\'s `qualities` in ottoport_list_models.' },
326
329
  n: { type: "number" },
327
330
  seed: { type: "number" },
328
331
  image_url: { type: "string", description: "One reference image, for editing and image-to-image — or, on a layer-decomposition model, the image to split." },
@@ -337,24 +340,30 @@ const TOOLS = [
337
340
  },
338
341
  {
339
342
  name: "ottoport_generate_video",
340
- description: "Generate a video through an OttoPort video model (Veo, Kling, Seedance, …). Modes: text-to-video, image-to-video (`image_url`), first-and-last-frame (plus `last_frame_url`), reference-to-video (`reference_image_urls`), and on some models video edit/extend (`video_url`). video-depth-anything instead turns `video_url` into a grayscale depth video and takes no prompt. Which a model accepts is in its capabilities — call ottoport_list_models. Blocks on the queue and returns a video URL, unless `webhook_url` is given.",
343
+ description: "Generate a video through an OttoPort video model (Veo, Kling, Seedance, …). Modes: text-to-video, image-to-video (`image_url`), first-and-last-frame (plus `last_frame_url`), reference-to-video (`reference_image_urls`, plus `reference_video_urls` / `reference_audio_urls` on models whose capabilities list `referenceMedia`), and on some models video edit/extend (`video_url`). Seedance 2.5 also drafts: `draft: true` renders a cheap 480p preview, and `draft_id` set to that job's id renders the same shot at 1080p. video-depth-anything instead turns `video_url` into a grayscale depth video and takes no prompt. Kling motion control (`kling-2.6-motion-control`, `kling-3.0-motion-control` and their `-pro` variants) makes the character in `image_url` perform the movement in `video_url`; the prompt is optional and the output runs as long as the clip. Which a model accepts is in its capabilities — call ottoport_list_models. Blocks on the queue and returns a video URL, unless `webhook_url` is given.",
341
344
  inputSchema: {
342
345
  type: "object",
343
346
  properties: {
344
- prompt: { type: "string", description: "Required, except on video-depth-anything, which takes none." },
345
- model: { type: "string", description: "Model id, e.g. veo-3.1, kling-3.0, seedance-2.0-fast, video-depth-anything. Default kling-3.0." },
347
+ prompt: { type: "string", description: "Required, except on video-depth-anything, which takes none, and the motion-control models, where it is optional." },
348
+ model: { type: "string", description: "Model id, e.g. veo-3.1, kling-3.0, seedance-2.0-fast, kling-3.0-motion-control, video-depth-anything. Default kling-3.0." },
346
349
  duration: { type: "number", description: "Seconds. The main lever on what this costs." },
347
350
  // Per-model, not universal — see the note on the image tool. kling-3.0
348
351
  // has no 480p and no 4k; gemini-omni-flash has only 720p.
349
352
  resolution: { type: "string", description: 'Output detail — "480p", "720p", "1080p", "2k" or "4k", but only the tiers this model lists in ottoport_list_models. Priced accordingly, so it is worth reading before spending.' },
350
353
  aspect_ratio: { type: "string", description: 'e.g. "16:9".' },
351
354
  seed: { type: "number" },
352
- image_url: { type: "string", description: "First frame, for image-to-video." },
355
+ image_url: { type: "string", description: "First frame, for image-to-video — or, on a motion-control model, the character who performs the movement." },
353
356
  last_frame_url: { type: "string", description: "Final frame. With `image_url`, this is first-and-last-frame generation." },
354
357
  reference_image_urls: { type: "array", items: { type: "string" }, description: "Subjects the shot carries through — a character, a product, a style — without being a frame of it." },
358
+ reference_video_urls: { type: "array", items: { type: "string" }, description: "Reference videos — motion, a performance, a scene — on models listing `referenceMedia` (Seedance 2.x, MiniMax H3, Wan 3.0). Billed per second of reference video where the upstream charges for it. To change one clip rather than draw on it, send it as `video_url` on a model listing video-edit." },
359
+ reference_audio_urls: { type: "array", items: { type: "string" }, description: "Reference audio — a voice, a beat — beside reference images or videos, on the same models. Not billed." },
355
360
  keyframes: { type: "array", items: { type: "object", properties: { image_url: { type: "string" }, time: { type: "number", description: "Seconds from the start; omit to spread evenly." } }, required: ["image_url"] }, description: "Images pinned in time, for keyframes-to-video." },
356
- video_url: { type: "string", description: "A video to edit or extend, on models listing video-edit / video-extend — or the only input to video-depth-anything. Edits and depth bill per second of this video (at most 60s)." },
361
+ video_url: { type: "string", description: "A video to edit or extend, on models listing video-edit / video-extend — or the only input to video-depth-anything, or the movement a motion-control model transfers (3-30s; 3-10s with `character_orientation` \"image\"). Edits, depth and motion control bill per second of this video (edits and depth at most 60s; motion control at least 3s)." },
362
+ character_orientation: { type: "string", enum: ["video", "image"], description: "Motion-control models only: whether the character faces the way the person in `video_url` does (\"video\", the default) or keeps the pose of `image_url` (\"image\")." },
363
+ keep_original_sound: { type: "boolean", description: "Motion-control models only: keep the audio of `video_url` in the result." },
357
364
  video_task: { type: "string", enum: ["edit", "extend"], description: "edit (default) restyles video_url; extend continues it for `duration` more seconds." },
365
+ draft: { type: "boolean", description: "Seedance 2.5 only: render a 480p preview at about a quarter of the 1080p price, to check the shot before paying for it. Text, image and reference-image requests; no `resolution`." },
366
+ draft_id: { type: "string", description: "Seedance 2.5 only: the job id of a finished draft, to render that same shot at 1080p. Send `model` and this alone — prompt, inputs and duration come from the draft. Within seven days of the draft." },
358
367
  webhook_url: { type: "string", description: "Public HTTPS endpoint to POST the finished job to (events video.completed / video.failed, signed with HMAC-SHA256). With it the tool returns the job id at once instead of waiting." },
359
368
  webhook_secret: { type: "string", description: "Signing secret for webhook_url. Omit to use the server's OTTOPORT_WEBHOOK_SECRET." },
360
369
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ottoport",
3
- "version": "1.9.0",
3
+ "version": "1.11.0",
4
4
  "description": "Claude Code plugin, CLI and MCP server for OttoPort — one OpenAI-compatible API for every LLM, image, video, and speech model.",
5
5
  "homepage": "https://ottoport.ai",
6
6
  "repository": {
@@ -16,8 +16,8 @@ and do not call the HTTP API, when a tool covers the job:
16
16
  | --- | --- |
17
17
  | `ottoport_list_models` | The catalog: what each model is for, and its rate in credits and USD. Filter with `modality`, or pass `model` for ONE model in full — its modes, its resolution tiers with prices, and every parameter it reads. |
18
18
  | `ottoport_chat` | `prompt`, plus optional `model`, `system`, `temperature`, `max_tokens`. |
19
- | `ottoport_generate_image` | `prompt`, plus optional `model`, `size` or `resolution`, `quality` (GPT Image only), `aspect_ratio`, `n`, `seed`, `image_url` (one reference), `reference_image_urls` (several). Layer decomposition too: `model` `qwen-image-layered` or `seedream-5.0-layers` with `image_url` alone (prompt optional, `num_layers` on Qwen) returns one URL per RGBA layer. |
20
- | `ottoport_generate_video` | `prompt`, plus optional `model`, `duration`, `resolution`, `aspect_ratio`, `seed`, `image_url` (first frame), `last_frame_url`, `reference_image_urls`, `webhook_url` (returns the job id at once and POSTs the result there; the secret comes from `webhook_secret` or the server's `OTTOPORT_WEBHOOK_SECRET`). |
19
+ | `ottoport_generate_image` | `prompt`, plus optional `model`, `size` or `resolution`, `quality` (GPT Image and Ideogram), `aspect_ratio`, `n`, `seed`, `image_url` (one reference), `reference_image_urls` (several). Layer decomposition too: `model` `qwen-image-layered` or `seedream-5.0-layers` with `image_url` alone (prompt optional, `num_layers` on Qwen) returns one URL per RGBA layer. |
20
+ | `ottoport_generate_video` | `prompt`, plus optional `model`, `duration`, `resolution`, `aspect_ratio`, `seed`, `image_url` (first frame), `last_frame_url`, `reference_image_urls`, `reference_video_urls` / `reference_audio_urls` (models listing `referenceMedia`), `video_url` (edit / extend, or the movement for motion control), `character_orientation` / `keep_original_sound` (motion control), `draft` / `draft_id` (Seedance 2.5: a 480p preview, then the same shot at 1080p from the preview's job id), `webhook_url` (returns the job id at once and POSTs the result there; the secret comes from `webhook_secret` or the server's `OTTOPORT_WEBHOOK_SECRET`). |
21
21
  | `ottoport_video_webhook` | `job_id`, plus `action` `status` (every delivery attempt and the endpoint's response) or `retry` (redeliver a finished job's webhook now). |
22
22
  | `ottoport_generate_speech` | `prompt` (the text), plus optional `model`, `voice`, `format`. |
23
23
  | `ottoport_generate_music` | `prompt`, plus optional `model`, `duration`, `format`. |
@@ -28,7 +28,7 @@ say so rather than reaching for a shell. `ottoport install <host>` registers it
28
28
 
29
29
  ## Modes
30
30
 
31
- Video takes four, and which ones a model accepts is per-model — `ottoport_list_models`
31
+ Video takes five, and which ones a model accepts is per-model — `ottoport_list_models`
32
32
  prints each one's menu beside its price:
33
33
 
34
34
  | Mode | Send |
@@ -36,7 +36,8 @@ prints each one's menu beside its price:
36
36
  | text-to-video | `prompt` alone |
37
37
  | image-to-video | `image_url` — the first frame |
38
38
  | first-and-last-frame | `image_url` **and** `last_frame_url` |
39
- | reference-to-video | `reference_image_urls` — a character, a product, a style the shot carries through without either being a frame of it |
39
+ | reference-to-video | `reference_image_urls` — a character, a product, a style the shot carries through without either being a frame of it; plus `reference_video_urls` and `reference_audio_urls` (motion, a performance, a voice) on models whose capabilities list `referenceMedia` — Seedance 2.x, MiniMax H3, Wan 3.0 |
40
+ | motion-control | `image_url` (the character) **and** `video_url` (a 3-30s clip of the movement), on `kling-2.6-motion-control`, `kling-3.0-motion-control` and their `-pro` variants. Prompt optional; `character_orientation` `"video"` (default) or `"image"` (clip then capped at 10s), `keep_original_sound`. Bills per second of the clip, 3s at least |
40
41
 
41
42
  Images are the same idea with one axis: `image_url` for a single edit, or
42
43
  `reference_image_urls` for several at once, up to that model's limit.
@@ -55,8 +56,8 @@ video and `"1k"`/`"2k"`/`"4k"` for images, but **no model offers all of it**:
55
56
  `gpt-image-1.5` only 1k. Same for how many references a model takes —
56
57
  `nano-banana-lite` accepts 3, `gpt-image-2` accepts 16.
57
58
 
58
- `quality` is a second priced dial, on the GPT Image family alone: `low`,
59
- `medium` (the default, and the tier every catalog rate was measured at),
59
+ `quality` is a second priced dial, on the GPT Image family and `ideogram-4.5`:
60
+ `low`, `medium` (the default, and the tier every catalog rate was measured at),
60
61
  `high`, and `xhigh`/`max` on `gpt-image-2.5` and `gpt-image-2.5-flare`. It buys
61
62
  compute, not pixels, and the ladder is steep — `max` bills sixteen times
62
63
  `medium`. A model's tiers are its `qualities` in `ottoport_list_models`.
@@ -77,7 +78,7 @@ sensible default.
77
78
  | Modality | Default | Also available |
78
79
  | --- | --- | --- |
79
80
  | chat | `claude-sonnet-5` | `claude-haiku-4.5` (cheap), `gpt-5.5`, `gemini-3.5-flash` |
80
- | image | `gpt-image-2` | `nano-banana-pro` (high fidelity), `nano-banana-2` (edits) |
81
+ | image | `gpt-image-2` | `nano-banana-2.1` (fast generation and edits), `nano-banana-pro` (high fidelity) |
81
82
  | video | `kling-3.0` | `seedance-2.0-fast` (cheap), `veo-3.1` (with audio) |
82
83
  | speech | `gpt-4o-mini-tts` | `eleven-v3` |
83
84
  | music | `suno-v5` | `lyria-2` |