Spiral gives your agent every tool with one account. Browse the tools →

Codex · Social Media

How to Use Instagram V1 Convert media ID to shortcode in Codex

Returns conversion status, the original media ID, and the Instagram post shortcode. Use it to turn stored post IDs into Instagram links for reports or review queues.

Prompts to try with Instagram V1 Convert media ID to shortcode in Codex

Copy an example into Codex, or ask in your own words.

Use Instagram post shortcode for NASA media ID 3996242083173720380, then add the resulting post link to our report fixture.

Instagram V1 Convert media ID to shortcodeCodex
Try asking
  • Use Instagram post shortcode to backfill links for the @nasa post IDs in data/nasa-posts.csv, preserving every ID as text.

  • Use Instagram post shortcode for NASA media ID 3996242083173720380 and update our archive renderer to show its returned shortcode as a clickable Instagram link.

  • Use Instagram post shortcode for NASA media ID 3996242083173720380, then compare the result with Dd1gQBsCWE8 in our migration fixture.

  • Use Instagram post shortcode for NASA media ID 3996242083173720380 and trace whether our CSV importer preserves those exact digits before conversion.

How to set up Instagram V1 Convert media ID to shortcode in Codex

Pick the way that suits you. Each takes about two minutes.

Use Spiral's MCP server

  1. Add the hosted server
    codex mcp add spiral --url https://api.spiral.ai/mcp
  2. Sign in

    Codex opens the browser: sign in to Spiral and click Authorize. No API key. codex mcp list then shows Spiral.

    codex mcp login spiral

Use the Spiral skill

  1. Send Codex this message

    Your agent reads Spiral's skill and sets itself up.

    set up https://spiral.ai/SKILL.md
  2. Sign in or paste a key

    Approve Spiral in the browser, or give the agent a key from the console.

Use the Spiral CLI

  1. Install and sign in

    Installs the Spiral CLI, signs you in and adds its skill to your coding agents.

    npx -y spiral-cli@latest init

Call the Spiral API

  1. Create an API key

    In the console, under API keys.

  2. Run Instagram V1 Convert media ID to shortcode

    One request; the result comes back by polling or a webhook.

    curl https://api.spiral.ai/v1/runs \
      -H "Authorization: Bearer $SPIRAL_API_KEY" \
      -H "Content-Type: application/json" \
      -H "Idempotency-Key: $(uuidgen)" \
      -d '{
        "provider": "tikhub",
        "model": "tikhub/instagram-v1-media-id-to-shortcode",
        "input": {
          "media_id": "3774507992167247878"
        }
      }'

Then paste one of the prompts above: Codex finds Instagram V1 Convert media ID to shortcode on Spiral, shows the price and runs it.

Instagram V1 Convert media ID to shortcode providers and prices

Spiral runs Instagram V1 Convert media ID to shortcode through TikHub. Open a card for today's price, with every fee included.

TikHubSocial Media
Instagram V1 · Convert media ID to shortcode
tikhub/instagram-v1-media-id-to-shortcode

What can you do with Instagram V1 Convert media ID to shortcode in Codex?

Add clickable Instagram source links to a project's stored post records. A coding agent can connect the conversion result to an importer, report generator, or archive migration while preserving long IDs as strings.

Add source links to campaign reports

Convert stored brand post IDs into shortcodes, then add Instagram links beside the corresponding campaign results.

Repair an internal content archive

Fill missing post links in an archive that retained Instagram media IDs but lost the original URLs.

Prepare an editorial review queue

Give editors clickable references for public business posts submitted as numeric media IDs.

Reconcile post references

Convert media IDs to shortcodes before matching an internal campaign export against a spreadsheet of Instagram post links.

Attach citations to research notes

Turn saved public organization post IDs into source links for an internal content research brief.

Check an identifier migration

Compare converted shortcodes with previously saved shortcodes to find discrepancies after moving a post archive between databases.

Questions about Instagram V1 Convert media ID to shortcode in Codex

Can Codex use Instagram V1 Convert media ID to shortcode?

Yes. Add Spiral to Codex as an MCP server, and Codex can find and run Instagram V1 Convert media ID to shortcode like any built-in tool.

How much does Instagram V1 Convert media ID to shortcode cost in Codex?

$0.0013 per request. You pay from your Spiral balance as you go, with no subscription, and a failed run is not charged. Your Codex plan is separate.

Do I need a TikHub account to use Instagram V1 Convert media ID to shortcode in Codex?

No. Spiral runs Instagram V1 Convert media ID to shortcode on its own TikHub account. You sign in to Spiral once and never paste a key.

How long does it take to set up Instagram V1 Convert media ID to shortcode in Codex?

About two minutes: add the hosted server, then sign in.

Does Codex wait while Instagram V1 Convert media ID to shortcode runs?

Instagram V1 Convert media ID to shortcode runs in the background. Codex starts the run, checks on it and gives you the json when it's ready.

What does Instagram post shortcode return?

TikHub documents three output values: conversion status, the original media ID, and the converted shortcode. The documented payload covers identifier conversion.

How do I turn the shortcode into an Instagram link?

Insert the returned shortcode into https://www.instagram.com/p/{shortcode}/. TikHub explicitly documents this post URL format.

Does successful conversion mean the post is still available?

No. Deleted Instagram posts can still have convertible media IDs, so a shortcode alone does not confirm current availability.

Why can an Instagram media ID produce the wrong shortcode?

Check whether the ID passed through a JavaScript Number. Instagram's documented example IDs exceed JavaScript's safe integer ceiling of 9,007,199,254,740,991; preserve the original digits as a string.

Can an Instagram shortcode reveal private content?

TikHub's Instagram coverage excludes private accounts, direct messages, and non-public insights. Constructing a post link does not expand that coverage.

Get started

Start using Instagram V1 Convert media ID to shortcode in Codex

One Spiral account for every tool your agent needs. No subscription; you pay per run.

Paste this into Codex:

Set up Codex

set up https://spiral.ai/SKILL.md
Are you an AI agent? See setup options