OOMOL Fusion API

画像・動画 API

画像生成、画像編集、動画生成をアプリに組み込みます。OOMOL の認証情報と使い慣れた SDK や HTTP API で、対応モデルを呼び出せます。

画像と動画の機能を製品に組み込む

画像を生成

テキストから商品画像、イラスト、クリエイティブ素材を作成します。

画像を編集

参照画像を使ってシーンや構図を変更し、新しい表現を試せます。

動画を生成

テキストや対応する参照素材から動画を生成し、タスクを照会して結果を取得します。

用途に合う API を選ぶ

OOMOL Fusion API から各社の一部の API に接続できます。対応モデルとパラメーターは提供元ごとに異なります。

OpenAI Images

画像生成・編集

/v1/provider/openai/v1

Seedream

画像生成、参照画像、SSE 出力

/v1/provider/seedream/api/v3

Seedance

動画生成・タスク照会

/v1/provider/seedance/api/v3

Wanx

動画生成・タスク照会

/v1/provider/wanx/api/v1

Kling

動画生成・タスク照会

/v1/provider/kling/

MiniMax

動画生成・タスク照会

/v1/provider/minimax/

対応範囲はモデルと操作ごとに異なります。アップロード、キャンセル、ストリーミングの可否や制限を接続前に確認してください。

料金を見る

モデルを選んで接続例を見る

提供元に対応する SDK または HTTP API を使用します。各例にはクライアント設定と生成リクエストが含まれます。

  1. クライアントを設定

    提供元別の Base URL と OOMOL トークンを使用します。指定のタイムアウトを設定し、重複生成を防ぐため作成リクエストの自動再試行を無効にします。

  2. 対応モデルを呼び出す

    対応するリクエストパラメーターとレスポンス形式を利用できます。動画の結果は提供元のタスク照会 API で取得します。

例では https://fusion-api.oomol.com を使用します。FUSION_API_TOKEN に OOMOL トークンを設定し、記載されたバージョンのパッケージをインストールしてください。利用前に API の提供状況を確認してください。

モデルを選んで接続例を見る
OpenAI Images · TypeScriptopenai@7.23.0
import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.FUSION_API_TOKEN,
  baseURL: "https://fusion-api.oomol.com/v1/provider/openai/v1",
  maxRetries: 0,
  timeout: 1_080_000,
});

const result = await client.images.generate({
  model: "gpt-image-2",
  prompt: "A ceramic mug on a wooden table",
  size: "1536x864",
  quality: "medium",
});
console.log(result);

Base URL: https://fusion-api.oomol.com/v1/provider/openai/v1

Seedream · TypeScript@volcengine/ark-runtime@1.0.11
import { ArkRuntimeClient } from "@volcengine/ark-runtime";

const client = new ArkRuntimeClient({
  apiKey: process.env.FUSION_API_TOKEN,
  baseURL: "https://fusion-api.oomol.com/v1/provider/seedream/api/v3",
  retryTimes: 0,
  timeout: 125_000,
});

const result = await client.generateImages({
  model: "doubao-seedream-5-0-260128",
  prompt: "A ceramic mug on a wooden table",
  size: "2K",
  response_format: "url",
});
console.log(result);

Base URL: https://fusion-api.oomol.com/v1/provider/seedream/api/v3

Seedance · TypeScript@volcengine/ark-runtime@1.0.11
import { ArkRuntimeClient } from "@volcengine/ark-runtime";

const client = new ArkRuntimeClient({
  apiKey: process.env.FUSION_API_TOKEN,
  baseURL: "https://fusion-api.oomol.com/v1/provider/seedance/api/v3",
  retryTimes: 0,
  timeout: 125_000,
});

const task = await client.createContentGenerationTask({
  model: "doubao-seedance-2-0-260128",
  content: [{ type: "text", text: "A boat on the ocean" }],
  duration: 5,
  resolution: "720p",
});
const status = await client.getContentGenerationTask(task.id);
console.log(task.id, status);

Base URL: https://fusion-api.oomol.com/v1/provider/seedance/api/v3

この例は動画タスクを作成し、一度だけ照会します。タスク ID を保存し、終了状態になるまで照会してください。進捗確認のために作成リクエストを繰り返さないでください。

Wanx · TypeScriptdashscope-sdk-official@1.26.0
import { Configuration, VideoSynthesis } from "dashscope-sdk-official";

const client = new VideoSynthesis(new Configuration({
  apiKey: process.env.FUSION_API_TOKEN,
  basePath: "https://fusion-api.oomol.com/v1/provider/wanx/api/v1",
}));

const task = await client.asyncCall({
  model: "wan3.0-video",
  prompt: "A boat on the ocean",
  resolution: "1080P",
  duration: 5,
});
const status = await client.fetch(task.output.task_id);
console.log(task.output.task_id, status);

Base URL: https://fusion-api.oomol.com/v1/provider/wanx/api/v1

この例は動画タスクを作成し、一度だけ照会します。タスク ID を保存し、終了状態になるまで照会してください。進捗確認のために作成リクエストを繰り返さないでください。

Kling · TypeScriptHTTP · ky@1.11.0
import ky from "ky";

const client = ky.create({
  prefixUrl: "https://fusion-api.oomol.com/v1/provider/kling/",
  headers: { Authorization: `Bearer ${process.env.FUSION_API_TOKEN}` },
  retry: 0,
  redirect: "error",
  timeout: 30_000,
});

const task = await client.post("text-to-video/kling-3.0-turbo", {
  json: {
    prompt: "A boat on the ocean",
    settings: { duration: 5, resolution: "720p", aspect_ratio: "16:9" },
  },
}).json<{ data: { id: string } }>();
const status = await client.get("tasks", {
  searchParams: { task_ids: task.data.id },
}).json();
console.log(task.data.id, status);

Base URL: https://fusion-api.oomol.com/v1/provider/kling/

この例は動画タスクを作成し、一度だけ照会します。タスク ID を保存し、終了状態になるまで照会してください。進捗確認のために作成リクエストを繰り返さないでください。

MiniMax · TypeScriptHTTP · ky@1.11.0
import ky from "ky";

const client = ky.create({
  prefixUrl: "https://fusion-api.oomol.com/v1/provider/minimax/",
  headers: { Authorization: `Bearer ${process.env.FUSION_API_TOKEN}` },
  retry: 0,
  redirect: "error",
  timeout: 30_000,
});

const task = await client.post("v2/video_generation", {
  json: {
    model: "MiniMax-H3",
    content: [{ type: "text", text: "A boat on the ocean" }],
    duration: 5,
    resolution: "768P",
    ratio: "16:9",
  },
}).json<{ task_id: string }>();
const status = await client.get(
  `v2/query/video_generation/${encodeURIComponent(task.task_id)}`,
).json();
console.log(task.task_id, status);

Base URL: https://fusion-api.oomol.com/v1/provider/minimax/

この例は動画タスクを作成し、一度だけ照会します。タスク ID を保存し、終了状態になるまで照会してください。進捗確認のために作成リクエストを繰り返さないでください。

AI エージェントで使う場合

エージェントやワークフロー向けに用意された、対応サービスの操作を探せます。

連携ツールを見る