Owl3D Cloud API
この API は 2D 動画を
AI コーディングエージェントは、
始める前に
- app.owl3d.com に
サインインし、 メールアドレスを 確認します。 - プランに
加入するか、 クレジットを 購入します。 ジョブは まず プランの 月間クレジットを 使い、 次に 購入した クレジットを 使います。 トライアルの クレジットも 使えます。 - API キーの
ページを 開き、 キーを 作成します。 キーが 表示されるのは 1 回だけです。
キーはOWL3D_API_KEY に
API の
export OWL3D_API_KEY="o3d_live_..."認証
| 項目 | 値 |
|---|---|
| Base URL | https://api.owl3d.com |
| キーの |
o3d_live_<keyId>_<secret> |
| 認証ヘッダー | Authorization: Bearer <key> |
Bearer は401 に
各ルートにはjobs:read または jobs:write。
キーは
GET /v1/jobs/{id}
curl https://api.owl3d.com/v1/jobs/job_... \
-H "Authorization: Bearer $OWL3D_API_KEY"{"id": "job_...", "status": "converting"}動画を 1 本変換する
スクリプトを 1 つダウンロードし、
| スクリプト | 必要な |
実行 |
|---|---|---|
| convert.sh | bash, curl, jq, ffprobe | bash convert.sh my-video.mp4 |
| convert.py | Python 3.9+, requests, ffprobe |
python3 convert.py my-video.mp4 |
| convert.mjs | Node.js 20+, ffprobe | node convert.mjs my-video.mp4 |
convert.sh · convert.py · convert.mjs
curl -O https://www.owl3d.com/docs/api/convert.sh
bash convert.sh my-video.mp4スクリプトは
流れは 6 ステップです。
- ファイルの
情報を 読み取り、 フィンガープリントを 作ります。 POST /v1/estimates:見積もりを 取得します。 課金は されません。 POST /v1/jobs:見積もりを 承認します。 クレジットが 確保されます。 - 各パートを アップロード URL に
PUTし、続けて POST /v1/jobs/{id}/upload-completeを呼びます。 GET /v1/jobs/{id}を 15 秒ごとにポーリングします。 GET /v1/jobs/{id}/result:ダウンロードリンクを 取得します。 リンクは 15 分間有効で、 GETのみ使えます。
先にPOST /v1/jobs に
エラー
ほとんどのerror に
| ステータス | 意味 |
|---|---|
400 |
不正なbad_fingerprint |
401 |
トークンが |
402 |
short_of_credits: |
403 |
insufficient_scope、 |
404 |
no_job。 |
409 |
状態のnot_uploading、endpoint_exists |
410 |
出力のinsufficient_credits_expired: |
429 |
上限に |
リトライの
429の場合は、 Retry-Afterの秒数だけ待ち、 同じリクエストを 送ります。 5xxまたはネットワークエラーの 場合は、 1 秒から 60 秒まで バックオフします。 - それ以外の
4xxの場合は、 リクエストを 修正します。
curl -i https://api.owl3d.com/v1/jobs/job_unknown \
-H "Authorization: Bearer $OWL3D_API_KEY"{"error": "no_job"}制限
| 制限 | 値 | レスポンス |
|---|---|---|
| 進行中の |
アカウントの |
429 concurrency_limit、Retry-After: 15 |
| リクエスト | キーごとに 1 分間 120 回 | 429、Retry-After: 60 |
| バースト | ルートごとに 1 秒 10 回、 |
429 throttled、Retry-After: 1 |
| 1 日の |
キーごとに |
429 daily_credit_cap(00:00 UTC まで) |
| 有効な |
アカウントごとに 10 個 | 作成が |
| 入力 | 100 GB、 |
見積もりが |
| コンテナ | MP4, MOV, MKV, M4V | 見積もりが |
429 concurrency_limit のscope は api(アカウントのaccount(アカウントのkey(この
{
"error": "concurrency_limit",
"scope": "api",
"limit": 10,
"inProgress": 10
}ルート
| メソッドと |
スコープ | 内容 |
|---|---|---|
POST /v1/estimates |
jobs:write |
料金と |
POST /v1/jobs |
jobs:write |
クレジットをestimateId をfilename と sizeBytes を |
GET /v1/jobs/{id}/upload |
jobs:read |
アップロードのdone、missing、parts URL |
POST /v1/jobs/{id}/upload-complete |
jobs:write |
ETag を |
GET /v1/jobs/{id} |
jobs:read |
ステータス、 |
POST /v1/jobs/{id}/cancel |
jobs:write |
ジョブを |
POST /v1/jobs/{id}/resume |
jobs:write |
クレジットをinsufficient_credits の |
GET /v1/jobs/{id}/result |
jobs:read |
ダウンロードリンク |
見積もり
POST /v1/estimates は、
| フィールド | 値 |
|---|---|
name、size |
ファイル名と、 |
durationSeconds、width、height、fps |
ffprobe や MediaInfo など、 |
codec |
H.264、HEVC、AV1、VP9 の |
bitDepth、chroma |
ファイルからchroma は 4:2:0 です |
fingerprint |
{size, headSha256, tailSha256, edgeBytes} |
edgeBytesは 4194304 です。ファイルが それより 小さい 場合は、 ファイルサイズです。 headSha256とtailSha256は、ファイルの 先頭 edgeBytesバイトと末尾 edgeBytesバイトのハッシュです。
レスポンスの "ok": false は、reason をcredits.shortBy が 0 よりcredits.fromPlan、credits.fromTrial、credits.fromPurchased は、
POST /v1/estimates
curl https://api.owl3d.com/v1/estimates \
-H "Authorization: Bearer $OWL3D_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "my-video.mp4",
"size": 104857600,
"durationSeconds": 120,
"width": 1920, "height": 1080, "fps": 24,
"codec": "H.264", "bitDepth": 8, "chroma": "4:2:0",
"fingerprint": {
"size": 104857600,
"headSha256": "<SHA-256 of the first 4194304 bytes>",
"tailSha256": "<SHA-256 of the last 4194304 bytes>",
"edgeBytes": 4194304
}
}'{
"ok": true,
"id": "est_...",
"credits": {
"total": 60,
"fromPlan": 60,
"fromTrial": 0,
"fromPurchased": 0,
"shortBy": 0
},
"etaMinutes": 6,
"hdr": {"detected": false},
"output": {"format": "FULL_SBS", "width": 3840, "height": 1080}
}ジョブ
{"estimateId": "est_..."} をPOST /v1/jobs をid とupload.partSize と upload.parts の URL)が
出力オプション
POST /v1/jobs は output: {layout, max_height} も
layout:full_sbs(デフォルト)。max_height:"source"(デフォルト)、2160、1080。
POST /v1/jobs
curl https://api.owl3d.com/v1/jobs \
-H "Authorization: Bearer $OWL3D_API_KEY" \
-H "Content-Type: application/json" \
-d '{"estimateId": "est_...", "output": {"layout": "full_sbs", "max_height": "source"}}'{
"id": "job_...",
"status": "uploading",
"upload": {
"partSize": 67108864,
"parts": ["https://...", "https://..."],
"completeUrl": "/v1/jobs/job_.../upload-complete"
}
}先にアップロード
estimateId をPOST /v1/jobs を
| フィールド | 値 |
|---|---|
filename |
ファイル名、.mp4、.mov、.mkv、.m4v の |
sizeBytes |
ファイルサイズ |
output |
任意。 |
- 残高は
最低料金に 足りている 必要が あります。 足りない 場合、 応答は 402 short_of_creditsで、ジョブは 作られません。 201の応答には reservedCreditsと"priceAfterUpload": trueも入ります。 - アップロード後、
サーバーが ファイルを 読み取って 料金を 決めます。 - サーバーが
ファイルを 変換できない 場合、 ジョブは failedになります。 課金は されず、 ファイルは 削除されます。
HDR10 の400 hdr_needs_estimate です。
POST /v1/jobs (upload first)
curl https://api.owl3d.com/v1/jobs \
-H "Authorization: Bearer $OWL3D_API_KEY" \
-H "Content-Type: application/json" \
-d "{\"filename\": \"my-video.mp4\", \"sizeBytes\": $(wc -c < my-video.mp4)}"{
"id": "job_...",
"status": "uploading",
"upload": {
"partSize": 67108864,
"parts": ["https://...", "https://..."],
"completeUrl": "/v1/jobs/job_.../upload-complete"
},
"reservedCredits": 15,
"priceAfterUpload": true
}クレジット不足
料金がinsufficient_credits に
GET /v1/jobs/{id}にshortBy(追加が必要な クレジット)、 neededCredits、deleteAt、resumeUrlが表示されます。 - クレジットを
追加してから、 POST /v1/jobs/{id}/resumeを送ります。 ファイルを 再アップロードしないでください。 - 残高が
まだ 足りない 場合、 resume は shortBy付きの402 short_of_creditsを返します。 deleteAt(24 時間)までに resume しないと、ジョブは insufficient_credits_expiredでfailedになります。 ファイルは 削除されます。
POST /v1/jobs/{id}/resume
curl -X POST https://api.owl3d.com/v1/jobs/job_.../resume \
-H "Authorization: Bearer $OWL3D_API_KEY"{
"id": "job_...",
"status": "queued"
}{
"error": "short_of_credits",
"shortBy": 120,
"neededCredits": 450,
"deleteAt": "2026-11-04T09:00:00.000Z"
}アップロード
- ファイルを
upload.partSizeバイトずつのパートに 分けます。 パート 1 は バイト 0 から 始まります。 - 各パートを
upload.partsの対応する URL に PUTします。各レスポンスの ETagヘッダーを、引用符も 含めて 保存します。 - パートの
順に 並べた {"etags": [...]}を付けて POST /v1/jobs/{id}/upload-completeを呼びます。
各 URL は、partSize バイトにし、Content-Length を
アップロードが
GET /v1/jobs/{id}/uploadを呼びます。 doneを読みます。 各項目に partNumber、etag、sizeが入っています。 missingを読みます。 パート番号の 一覧です。 - 足りない
各パートを parts[partNumber - 1]にアップロードします。 これらの URL は 1 時間有効です。 - すべての ETag を
パートの 順に 付けて 完了します。 同じ ファイルを 使ってください。
アップロードは 24 時間以内に
PUT upload.parts[n] · POST /v1/jobs/{id}/upload-complete
split -b 67108864 my-video.mp4 part_
curl -sS -D - -o /dev/null -X PUT --upload-file part_aa "<upload.parts[0]>" | grep -i '^etag'
curl -sS -D - -o /dev/null -X PUT --upload-file part_ab "<upload.parts[1]>" | grep -i '^etag'
curl https://api.owl3d.com/v1/jobs/job_.../upload-complete \
-H "Authorization: Bearer $OWL3D_API_KEY" \
-H "Content-Type: application/json" \
-d '{"etags": ["\"<etag of part 1>\"", "\"<etag of part 2>\""]}'{"id": "job_...", "status": "queued"}GET /v1/jobs/{id}/upload
curl https://api.owl3d.com/v1/jobs/job_.../upload \
-H "Authorization: Bearer $OWL3D_API_KEY"{
"id": "job_...",
"partSize": 67108864,
"parts": ["https://...", "https://..."],
"completeUrl": "/v1/jobs/job_.../upload-complete",
"done": [{"partNumber": 1, "etag": "\"...\"", "size": 67108864}],
"missing": [2]
}ジョブのステータス
GET /v1/jobs/{id} は、
status |
意味 |
|---|---|
uploading |
ジョブは |
queued |
ジョブは GPU をconverting からqueued に |
converting |
progress が 0 から 1 に |
delayed |
こちら側で |
insufficient_credits |
料金がshortBy クレジットを |
done |
完了です。result に |
failed |
error に code が |
cancelled |
呼び出し側が |
GET /v1/jobs/{id}
curl https://api.owl3d.com/v1/jobs/job_... \
-H "Authorization: Bearer $OWL3D_API_KEY"{
"id": "job_...",
"status": "converting",
"progress": 0.42,
"etaSeconds": 310
}結果
GET /v1/jobs/{id}/result は、done のGET のみ410 です。
GET /v1/jobs/{id}/result
curl https://api.owl3d.com/v1/jobs/job_.../result \
-H "Authorization: Bearer $OWL3D_API_KEY"
curl -o output.mp4 "<url>"{
"url": "https://...",
"filename": "...",
"sizeBytes": 209715200,
"expiresInS": 900
}キャンセル
POST /v1/jobs/{id}/cancel はprogress を
POST /v1/jobs/{id}/cancel
curl -X POST https://api.owl3d.com/v1/jobs/job_.../cancel \
-H "Authorization: Bearer $OWL3D_API_KEY"{"id": "job_...", "status": "cancelled"}