PRODUCTION REST API · v1

Build downloads with YTSave

Resolve a public media URL, select an exact format, create an asynchronous job and hand the signed result to your user. The same bounded production pipeline powers the YTSave website.

YTSaveClientHTTPS 経由の JSON非同期ジョブスコープ付き認証情報
01

クイックスタート

YTSave handles API host by first identifying support-activated credentials. It follows with an assigned tenant endpoint and keeps a server-only call path in view.

テナント URLhttps://ytsave.app
認証X-API-Key: ys_live_…
クライアントプロファイルYTSaveClient
API バージョンv1
# Available only after support activation
export YTSAVE_API_KEY="issued-after-review"

curl -X POST https://ytsave.app/v1/resolve \
  -H "X-API-Key: $YTSAVE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://www.youtube.com/watch?v=VIDEO_ID"}'

To explain Credential safety, YTSave separates server-side secret storage from no client bundle embedding. An evidence record gives no public logs or repositories its own place.

02

リンクを解決する

YTSave handles Resolve operation by first identifying source detection. It follows with formats from one submitted URL and keeps no invented outputs in view.

ポスト/v1/resolve範囲:解決
フィールドタイプ必須説明
urlHTTPS URLはい分析する公開または認可されたメディアページ。
tenant文字列いいえ割り当てられたテナント ドメイン 通常は省略されます。
{
  "success": true,
  "platform": "youtube",
  "title": "Example video",
  "formats": [
    {"id":"18","type":"video","quality":"360p","container":"mp4"}
  ],
  "cached": false
}

To explain Format identifier, YTSave separates the returned value unchanged from per-link availability. An evidence record gives no guessed quality label its own place.

03

ダウンロードジョブを作成して追跡する

For Job creation, YTSave begins with asynchronous preparation. Its evidence record pairs that with a short HTTP request and ends with bounded worker execution.

ポスト/v1/jobs範囲:仕事
フィールドタイプ必須説明
urlHTTPS URLはい解決するために提出された同じ正規化されたソース。
format_id文字列はい解決応答からの正確な ID。
tenant文字列いいえ割り当てられたテナント ドメイン 通常は省略されます。
curl -X POST https://ytsave.app/v1/jobs \
  -H "X-API-Key: $YTSAVE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://www.youtube.com/watch?v=VIDEO_ID","format_id":"18"}'
1202 受理Save job_id.
2投票状況GET /v1/jobs/{job_id} with the same key.
3準備完了署名されたダウンロードURLを開きます。
ステータス意味クライアントアクション
queued制限付きキューに受け入れられました。バックオフで再度ポールします。
extractingソースメタデータまたはルートを更新しています。投票を続けてください。
processingダウンロード、リマスタリングまたはマージ。サーバの進<0xE6><0x8D><0x97>を表示します。
ready署名付きダウンロードが利用可能です。URL をユーザーに送信します。
failedターミナル構造化エラー。Read error_code. Retry only when advised.
expired一時的な出力は削除された。新しいジョブを作成します。
curl https://ytsave.app/v1/jobs/JOB_ID \
  -H "X-API-Key: $YTSAVE_API_KEY"

YTSave makes Job polling easy to scan. The page starts with one-second initial wait, moves to capped backoff, and clearly states temporary signed delivery.

04

予測可能な誤り

For Error contract, YTSave checks one non-2xx envelope before a support request ID. This evidence record also makes predictable client handling clear.

{
  "success": false,
  "error": {
    "code": "RATE_LIMITED",
    "category": "rate_limited",
    "message": "Too many requests. Please try again shortly.",
    "retryable": true,
    "details": {"retry_after_seconds": 20}
  },
  "request_id": "…"
}
超高速トランザクション処理典型的な意味アクション
400無効な URL、本体または利用できないフォーマット。リクエストを修正します。フォーマットについて再度解決します。
401欠落、無効、有効期限切れ、またはスコープの間違ったキー。サーバ側の認証情報を確認します。
403テナントまたはソースポリシーが要求を拒否しました。ポリシーをバイパスしないでください サポートに連絡してください。
404未知または期限切れのジョブ。適切な場合は新しいジョブを作成します。
429リクエストまたはアクティブジョブの制限に達しました。Honor retry_after_seconds.
503キュー/容量または上流が一時的に利用できません。指数関数的なバックオフとジッターで再試行します。
05

運用契約

YTSave issues an operational quota with each approval to safeguard the API consumer and upstream media services.

YTSave handles Schema access by first identifying activation before exploration. It follows with assigned authentication and keeps documented request shapes in view. OpenAPI 参考文献

オペレータ監視アクセス

Request your API key

Document the API consumer, its monthly request estimate and supported platform requirements. YTSave reviews whether resolve, job submission or both are justified before issuing a once-visible key.

Request API access キーはテナントスコープであり、撤回可能であり、コンタクトフォームを通じて発行されます。 匿名スクリプトはダウンロードアーの作業を実行できません。