Guide: cobalt

Cobalt API Alternative

cobalt’s own docs say hosted instances such as api.cobalt.tools “use bot protection” and “are not intended to be used in other projects without explicit permission”. So the options are to host your own instance or ask an instance owner. If you want an API key today and no server to run, this hosted API resolves public Instagram, TikTok, X, Pinterest and Telegram links with one POST. If you need YouTube, cobalt is the better pick.

No card needed. Failed requests cost nothing.

Network cables connected to a server rack

Key facts

Endpoint
POST /v1/resolve (one endpoint for every service)
Free trial
20 result credits after email verification, no card
Price
from $19 for 7,500 results ($1.33–$2.53 per 1,000)
Billing
prepaid credits, no subscription, no expiry; failed or empty requests cost 0
Credits per result
1 (Instagram, TikTok, X, Pinterest) or 2 (Stories, Highlights, Telegram)
Limits
up to 20 items per request; 120 requests per minute per account; 2 in progress at once on the trial, 8 on paid accounts

cobalt and this API side by side

cobalt (self-hosted)GetInSaver API
What it isOpen-source project you run yourselfHosted REST API
API keyThe instance owner assigns it. Sent as Authorization: Api-Key ...Self-service in the dashboard. Sent as Authorization: Bearer ...
PlatformsA long list, with YouTube, Instagram, TikTok, X, Pinterest and RedditInstagram, TikTok, X, Pinterest, Telegram
Instagram StoriesNot on its services listActive public Stories and public Highlights
TelegramNot on its services listPublic channel posts
Responsetunnel, redirect, picker, local-processing or errorAn items array, or an error
CostFree software. Your server, your network, your upkeep.20 free results, then prepaid from $19. Failed requests cost nothing.

Moving from cobalt

Three things change: the URL, the auth header, and the response handling.

cobaltThis API
POST / with {"url": "..."}POST /v1/resolve with {"service": "...", "url": "..."}
Authorization: Api-Key ...Authorization: Bearer gis_live_...
status: "tunnel" or "redirect", read urlRead items[0].url
status: "picker", read picker[].url and picker[].typeRead items[].url and items[].type (video, image, audio)
status: "error", read error.codeA non-2xx answer: read code and message
videoQuality, downloadMode, audioFormatNo such options: you get the file the source provides

Replacing the cobalt call

One function that takes a link and returns the same shape for every platform. Run it with GIS_KEY=gis_live_... node migrate.mjs.

migrate.mjs
// migrate.mjs, Node.js 18+, no packages. Run: GIS_KEY=gis_live_... node migrate.mjs
// cobalt needs only a url. This API also needs a service ID, so pick it from the link.
const API_URL = "https://developers.getinsaver.com/v1/resolve";
const HOSTS = { "instagram.com": "instagram", "tiktok.com": "tiktok", "x.com": "x", "twitter.com": "x", "pinterest.com": "pinterest", "pin.it": "pinterest", "t.me": "telegram" };

function serviceFor(link) {
  const url = new URL(link);
  const host = url.hostname.replace(/^(www|m|vm|vt)\./, "");
  if (host === "instagram.com" && url.pathname.startsWith("/stories/highlights/")) return "instagram-highlight";
  if (host === "instagram.com" && url.pathname.startsWith("/stories/")) return "instagram-story";
  return HOSTS[host];
}

// One shape instead of tunnel, redirect and picker: [{ type: "video", url: "https://..." }]
async function download(link) {
  const service = serviceFor(link);
  if (!service) throw new Error("Not a supported link");
  const response = await fetch(API_URL, {
    method: "POST",
    headers: { Authorization: `Bearer ${process.env.GIS_KEY}`, "Content-Type": "application/json" },
    body: JSON.stringify({ service, url: link }),
    signal: AbortSignal.timeout(130_000)
  });
  const data = await response.json();
  if (!response.ok) throw new Error(`${data.code}: ${data.message}`);
  return data.items;
}

for (const item of await download("https://www.instagram.com/reel/SHORTCODE/")) console.log(item.type, item.url);

Which one to use

  • Host cobalt if you need YouTube or its other platforms, want quality and format options, and can run a server.
  • Use this API if you need Instagram Stories or Telegram, or do not want to run and update anything.
  • Need your own infrastructure with this API? Organizations can ask for a private deployment.

Errors

HTTPCodeWhat to do
402INSUFFICIENT_CREDITSTop up, or lower max_results: a request reserves max_results times the credits per result first.
422UPSTREAM_REJECTEDThe post is private, deleted, expired or login-only. Show the message to your user. Nothing was charged.
429RATE_LIMITED, CONCURRENCY_LIMITWait for Retry-After seconds and retry. 120 requests per minute per account; 2 at once on the trial, 8 after buying credits.
502, 504UPSTREAM_*Temporary platform failure. Safe to retry. Nothing was charged.

Every error body is JSON with a stable code and a readable message. The API reference has the full list.

FAQ

Can I use api.cobalt.tools in my app?

cobalt's docs say hosted instances such as api.cobalt.tools use bot protection and are not intended to be used in other projects without explicit permission. They suggest hosting your own instance or asking an instance owner.

How do I get a cobalt API key?

From the owner of an instance. If you host cobalt yourself, you assign the keys. This API gives you a key in its dashboard after you verify your email.

Does this API support YouTube?

No. If you need YouTube, host cobalt or run yt-dlp yourself.

Is this API open source?

No. It is a hosted commercial API with a free trial, while cobalt is open source and free to host.

Does it remove the TikTok watermark like cobalt?

Yes. The TikTok service returns the video file without the TikTok logo overlay.

Updated 2026-11-04. The code on this page is run by our test suite against the API server before every release.

Make your first call in five minutes

20 free results when you verify your email. No card needed.

Create a free account