AI-assistenter

ChatGPT Video Downloader

Brug ChatGPT Video Downloader med Hunt
ChatGPT Video Downloader med HuntAPI

Brug ChatGPT med HuntAPI til at downloade videoer, udtrække lyd og hente metadata - uden at forlade chatten. Ideelt til Custom GPTs, Actions og agents.

Hvad du kan gøre

  • Indsæt en YouTube- (eller anden) URL i ChatGPT og få en fil-URL
  • Udtræk kun lyd (download_type=audio)
  • Hent titel, varighed og thumbnail via https://api.huntapi.com/v1/media/metadata før download
  • Følg fremskridt (0–100) ved at polle https://api.huntapi.com/v1/jobs/{id}

Hurtig start

Hunt-downloads er asynkrone. ChatGPT bør:

  1. Kalde download-endpointet → få job_id
  2. Polle jobs indtil status = CompletedJob
  3. Returnere result.response (CDN-URL) og result.metadata

Trin 1: start download

GET https://api.huntapi.com/v1/video/download?query=https://www.youtube.com/watch?v=VIDEO_ID
x-api-key: YOUR_API_KEY

Svar:

{
  "job_id": "0193443f-fb80-9d19-29ba-82bc77c7cd84"
}

Trin 2: status og fremskridt

GET https://api.huntapi.com/v1/jobs/0193443f-fb80-9d19-29ba-82bc77c7cd84
x-api-key: YOUR_API_KEY

Kører:

{
  "id": "0193443f-fb80-9d19-29ba-82bc77c7cd84",
  "status": "Running",
  "progress": 63,
  "result": null
}

Færdig:

{
  "id": "0193443f-fb80-9d19-29ba-82bc77c7cd84",
  "status": "CompletedJob",
  "success": true,
  "progress": 100,
  "result": {
    "metadata": {
      "title": "Example video",
      "duration": 432,
      "thumbnail": "https://i.ytimg.com/vi/.../maxresdefault.jpg"
    },
    "response": "https://s3.huntapi.com/videos/<uuid>.mp4"
  }
}

Poll hvert 1–2. sekund, mens status er Queued eller Running.

Valgfrit: kun metadata (ingen download)

GET https://api.huntapi.com/v1/media/metadata?query=https://www.youtube.com/watch?v=VIDEO_ID
x-api-key: YOUR_API_KEY

Synkront - returnerer straks { "metadata": { ... } }.

Opsæt ChatGPT Actions

  1. Opret en Custom GPTConfigureActionsCreate new action
  2. Importér et OpenAPI-skema med:
    • GET https://api.huntapi.com/v1/video/download
    • GET https://api.huntapi.com/v1/jobs/{id}
    • (valgfrit) GET https://api.huntapi.com/v1/media/metadata
  3. Auth: API Key-header x-api-key
  4. Server-URL: https://api.huntapi.com
  5. Bed GPT’en om at polle til CompletedJob og dele fil-URL’en

Eksempel på system prompt (Custom GPT)

You are a video downloader assistant powered by HuntAPI.
When the user pastes a video URL:
1) Optionally call https://api.huntapi.com/v1/media/metadata to confirm title/duration.
2) Call /v1/video/download with query=<url>.
3) Poll /v1/jobs/{job_id} every 2 seconds until status is CompletedJob.
4) Return the CDN URL from result.response and a short summary from result.metadata.
Never invent download links. If status is Error/NotFound, explain the error clearly.

Nyttige query-parametre

ParamVærdierNoter
queryURLPåkrævet
download_typeaudio_video, audio, videoaudio til MP3
video_qualitybest, 1080p, 720p, …Lange videoer (>1t) begrænset til 720p
video_formatmp4, webm, mkvPræference

Relateret

VIDEO API

Discover why Hunt is the preferred API provider for developers.