Media library — API reference

Base URL https://iqcore.ai/api/public/v1. Every request needs Authorization: Bearer iqk_… (authentication); errors follow one envelope.

Media library

GET /media

  • Operation media_list
  • Scope media.read
  • Lowest role viewer
  • Read only
  • MCP media_list

Files in the account's Media library, newest first: id, name, kind, source, size, duration, created_at, updated_at, and the total. Filter by text in the name or tags, kind, source, collection id (or none) and updated_since; next_cursor gives the next page.

Parameters

  • q query string — Text in the file name or tags. max length 100
  • kind query string — Only this kind (default all). One of: all, image, video, audio.
  • source query string — Only this source (default all). One of: all, upload, generated, edited, reel, product_ref.
  • collection query string — A collection id from media_collections_list, or "none" for files in no collection. max length 64
  • limit query integer — At most this many (default 10). min 1 · max 25
  • updated_since query string — Only files changed at or after this time (ISO 8601 with the offset). max length 40
  • cursor query string — next_cursor of the previous answer: the next (older) page. max length 64
  • organization_id query string — The organization to act in. Required when the key works in several organizations.

Response 200

  • total integer required — Files matching the filters (all pages). min 0
  • items array of object required max items 25
    • id string required — The file id (uuid).
    • name string required — The file name (data: it can come from an upload or a store). max length 120
    • kind string required — image, video or audio.
    • source string required — upload, generated, edited, reel or product.
    • status string — ready; pending while a URL import runs; failed (see error). One of: ready, pending, failed.
    • size_kb integer required min 0
    • duration_s number — Seconds (video / audio).
    • created_at string
    • updated_at string
  • next_cursor string | null required — Send it as cursor for the next page; null = no more.
  • has_more boolean required

Errors: 400 401 403 404 422 429 500 — codes

Example

curl
curl "https://iqcore.ai/api/public/v1/media" \
  -H "Authorization: Bearer $IQCORE_KEY"
JavaScript
const res = await fetch("https://iqcore.ai/api/public/v1/media", {
  headers: { Authorization: `Bearer ${process.env.IQCORE_KEY}` },
});
console.log(res.status, await res.json());
Python
import os
import requests

res = requests.get(
    "https://iqcore.ai/api/public/v1/media",
    headers={"Authorization": f"Bearer {os.environ['IQCORE_KEY']}"},
)
print(res.status_code, res.json())
json
{
    "total": 1,
    "items": [
        {
            "id": "<id>",
            "name": "Summer sale",
            "kind": "kind",
            "source": "source",
            "status": "ready",
            "size_kb": 1,
            "duration_s": 1.5,
            "created_at": "2026-12-05T09:00:00Z",
            "updated_at": "2026-12-05T09:00:00Z"
        }
    ],
    "next_cursor": "next_cursor",
    "has_more": false
}

Add a media file

POST /media

  • Operation media_create
  • Scope media.write
  • Lowest role member
  • Changes data
  • MCP media_create

Add one file to the Media library. Either upload it as multipart/form-data (the field file, plus optional name, collection, tags): stored at once, status ready. Or send JSON {"url": "https://…"}: downloaded in the background (status pending; poll GET /media/{id} until ready or failed). The type is read from the bytes (JPG, PNG, WebP, GIF pictures; MP4, MOV, WebM videos; MP3, WAV, M4A, AAC, OGG audio) — never from the name or Content-Type; the Media library size limits and the storage of the plan apply. A URL must be public: http on port 80 or https on 443, no IP addresses, no user name or password; private, local and cloud metadata addresses are refused for the URL and every redirect (at most 3). 10 URL imports per minute per organization.

Parameters

  • Idempotency-Key header string — Your own id for this request (1–100 of A–Z a–z 0–9 . _ : -). The same key and request within 24 hours returns the first answer (Idempotent-Replayed: true) instead of acting twice; the same key with another request is refused (422 idempotency_key_reused); while the first one runs, 409 request_in_progress. Refusals before any effect are not stored.

Request body application/json or multipart/form-data

  • url string — A public http(s) URL of the file (standard port, no user name or password). Its query string is used for the download but never stored. min length 8 · max length 2048
  • name string — The file name in the Media library (default: from the URL or the upload). min length 1 · max length 200
  • collection string — A collection id (media_collections_list). max length 64
  • tags array of string — Tags (at most 300 characters together). max items 30
  • organization_id string — An organization id (uuid) of this key.

Response 201

  • id string required — The file id (uuid).
  • name string required — The file name (data: it can come from an upload or a store). max length 120
  • kind string | null required — image, video or audio; null while a URL import is pending or after it failed.
  • source string required — upload, generated, edited, reel or product.
  • status string required — ready; pending while a URL import runs; failed (see error). One of: ready, pending, failed.
  • size_kb integer required min 0
  • duration_s number — Seconds (video / audio).
  • created_at string
  • updated_at string
  • size_bytes integer min 0
  • duration_ms integer min 0
  • mime_type string
  • width integer
  • height integer
  • has_audio boolean — A video has sound (the stored flag; absent when unknown).
  • tags array of string max items 20
  • collection object
    • id string required
    • name string required
  • source_url string — For a file imported from a URL: that URL without its query string. max length 300
  • url string — The file. API only: a signed link bound to this API key, valid until urls_expire_at (15 to 22.5 minutes); 404 once the key is revoked.
  • thumb_url string — The thumbnail (pictures, videos with a poster). API only: a signed link bound to this API key, valid until urls_expire_at (15 to 22.5 minutes); 404 once the key is revoked.
  • poster_url string — The poster frame (videos). API only: a signed link bound to this API key, valid until urls_expire_at (15 to 22.5 minutes); 404 once the key is revoked.
  • urls_expire_at string — When url / thumb_url / poster_url stop working. Read the file again for fresh links.
  • error object — status failed: why the import failed.
    • code string required — e.g. url_not_public, url_unresolvable, too_many_redirects, http_error, timeout, too_large, unsupported_file_type, file_too_large, storage_full, file_rejected.
    • message string required

Errors: 400 401 403 404 409 413 422 429 500 — codes

Example

curl
curl -X POST "https://iqcore.ai/api/public/v1/media" \
  -H "Authorization: Bearer $IQCORE_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Summer sale"
}'

# Or upload the file itself (multipart):
curl -X POST "https://iqcore.ai/api/public/v1/media" \
  -H "Authorization: Bearer $IQCORE_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -F file=@picture.jpg
JavaScript
const res = await fetch("https://iqcore.ai/api/public/v1/media", {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.IQCORE_KEY}`, "Idempotency-Key": crypto.randomUUID(), "Content-Type": "application/json" },
  body: JSON.stringify({
      "name": "Summer sale"
  }),
});
console.log(res.status, await res.json());
Python
import os, uuid
import requests

res = requests.post(
    "https://iqcore.ai/api/public/v1/media",
    headers={"Authorization": f"Bearer {os.environ['IQCORE_KEY']}", "Idempotency-Key": str(uuid.uuid4())},
    json={
        "name": "Summer sale"
    },
)
print(res.status_code, res.json())
json
{
    "id": "<id>",
    "name": "Summer sale",
    "kind": "kind",
    "source": "source",
    "status": "ready",
    "size_kb": 1,
    "duration_s": 1.5,
    "created_at": "2026-12-05T09:00:00Z",
    "updated_at": "2026-12-05T09:00:00Z",
    "size_bytes": 1,
    "duration_ms": 1,
    "mime_type": "mime_type",
    "width": 1,
    "height": 1,
    "has_audio": false,
    "tags": [
        "tag"
    ],
    "collection": {
        "id": "<id>",
        "name": "Summer sale"
    },
    "source_url": "https://example.com/page",
    "url": "https://example.com/picture.jpg",
    "thumb_url": "https://example.com/page",
    "poster_url": "https://example.com/page",
    "urls_expire_at": "2026-12-05T09:00:00Z",
    "error": {
        "code": "code",
        "message": "message"
    }
}

Media collections

GET /media/collections

The collections (folders) of the account's Media library: id, name, kind (custom, or generated by the platform) and number of files, plus the number of files in no collection.

Parameters

  • organization_id query string — The organization to act in. Required when the key works in several organizations.

Response 200

  • collections array of object required max items 50
    • id string required — The collection id.
    • name string required
    • kind string required — custom (made by the team) or generated (kept by the platform).
    • files integer required — Files in this collection. min 0
  • more boolean — Present (true) when the account has more collections than listed.
  • uncategorised integer required — Files in no collection. min 0

Errors: 400 401 403 404 422 429 500 — codes

Example

curl
curl "https://iqcore.ai/api/public/v1/media/collections" \
  -H "Authorization: Bearer $IQCORE_KEY"
JavaScript
const res = await fetch("https://iqcore.ai/api/public/v1/media/collections", {
  headers: { Authorization: `Bearer ${process.env.IQCORE_KEY}` },
});
console.log(res.status, await res.json());
Python
import os
import requests

res = requests.get(
    "https://iqcore.ai/api/public/v1/media/collections",
    headers={"Authorization": f"Bearer {os.environ['IQCORE_KEY']}"},
)
print(res.status_code, res.json())
json
{
    "collections": [
        {
            "id": "<id>",
            "name": "Summer sale",
            "kind": "kind",
            "files": 1
        }
    ],
    "more": false,
    "uncategorised": 1
}

Save a media collection

POST /media/collections

Create a Media library collection (name, optional description), or rename / describe an existing one when the body names its id. The name is unique in the organization. Runs at once.

Parameters

  • Idempotency-Key header string — Your own id for this request (1–100 of A–Z a–z 0–9 . _ : -). The same key and request within 24 hours returns the first answer (Idempotent-Replayed: true) instead of acting twice; the same key with another request is refused (422 idempotency_key_reused); while the first one runs, 409 request_in_progress. Refusals before any effect are not stored.

Request body application/json

  • id string — The collection to change; leave out to create a new one. max length 64
  • name string required min length 1 · max length 120
  • description string | null max length 500
  • organization_id string — An organization id (uuid) of this key.

Response 200

  • id string required — The collection id (new or changed).
  • message string required — A short sentence for a person.

Errors: 400 401 403 404 409 422 429 500 — codes

Example

curl
curl -X POST "https://iqcore.ai/api/public/v1/media/collections" \
  -H "Authorization: Bearer $IQCORE_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Summer sale"
}'
JavaScript
const res = await fetch("https://iqcore.ai/api/public/v1/media/collections", {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.IQCORE_KEY}`, "Idempotency-Key": crypto.randomUUID(), "Content-Type": "application/json" },
  body: JSON.stringify({
      "name": "Summer sale"
  }),
});
console.log(res.status, await res.json());
Python
import os, uuid
import requests

res = requests.post(
    "https://iqcore.ai/api/public/v1/media/collections",
    headers={"Authorization": f"Bearer {os.environ['IQCORE_KEY']}", "Idempotency-Key": str(uuid.uuid4())},
    json={
        "name": "Summer sale"
    },
)
print(res.status_code, res.json())
json
{
    "id": "<id>",
    "message": "message"
}

Delete files

POST /media/delete

  • Operation media_delete
  • Scope media.delete
  • Lowest role admin
  • Deletes (owner or admin)
  • MCP media_delete

Delete Media library files for good (ids from media_list, at most 50). Cannot be undone. Runs at once; the owner or an admin only.

Parameters

  • Idempotency-Key header string — Your own id for this request (1–100 of A–Z a–z 0–9 . _ : -). The same key and request within 24 hours returns the first answer (Idempotent-Replayed: true) instead of acting twice; the same key with another request is refused (422 idempotency_key_reused); while the first one runs, 409 request_in_progress. Refusals before any effect are not stored.

Request body application/json

  • ids array of string required — File ids. min items 1 · max items 50
  • organization_id string — An organization id (uuid) of this key.

Response 200

  • deleted integer required — How many files were deleted. min 0
  • message string required

Errors: 400 401 403 404 409 422 429 500 — codes

Example

curl
curl -X POST "https://iqcore.ai/api/public/v1/media/delete" \
  -H "Authorization: Bearer $IQCORE_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "ids": [
        "<id>"
    ]
}'
JavaScript
const res = await fetch("https://iqcore.ai/api/public/v1/media/delete", {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.IQCORE_KEY}`, "Idempotency-Key": crypto.randomUUID(), "Content-Type": "application/json" },
  body: JSON.stringify({
      "ids": [
          "<id>"
      ]
  }),
});
console.log(res.status, await res.json());
Python
import os, uuid
import requests

res = requests.post(
    "https://iqcore.ai/api/public/v1/media/delete",
    headers={"Authorization": f"Bearer {os.environ['IQCORE_KEY']}", "Idempotency-Key": str(uuid.uuid4())},
    json={
        "ids": [
            "<id>"
        ]
    },
)
print(res.status_code, res.json())
json
{
    "deleted": 1,
    "message": "message"
}

Move files to a collection

POST /media/move

  • Operation media_move
  • Scope media.write
  • Lowest role member
  • Changes data
  • MCP media_move

Move Media library files (at most 50 ids) into a collection, or out of every collection with collection null. One unknown id refuses the whole request (404, nothing moves). Runs at once.

Parameters

  • Idempotency-Key header string — Your own id for this request (1–100 of A–Z a–z 0–9 . _ : -). The same key and request within 24 hours returns the first answer (Idempotent-Replayed: true) instead of acting twice; the same key with another request is refused (422 idempotency_key_reused); while the first one runs, 409 request_in_progress. Refusals before any effect are not stored.

Request body application/json

  • ids array of string required — File ids. min items 1 · max items 50
  • collection string | null required — The collection id, or null for none. max length 64
  • organization_id string — An organization id (uuid) of this key.

Response 200

  • moved integer required — Files moved. min 0
  • message string required — A short sentence for a person.

Errors: 400 401 403 404 409 422 429 500 — codes

Example

curl
curl -X POST "https://iqcore.ai/api/public/v1/media/move" \
  -H "Authorization: Bearer $IQCORE_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "ids": [
        "<id>"
    ],
    "collection": "collection"
}'
JavaScript
const res = await fetch("https://iqcore.ai/api/public/v1/media/move", {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.IQCORE_KEY}`, "Idempotency-Key": crypto.randomUUID(), "Content-Type": "application/json" },
  body: JSON.stringify({
      "ids": [
          "<id>"
      ],
      "collection": "collection"
  }),
});
console.log(res.status, await res.json());
Python
import os, uuid
import requests

res = requests.post(
    "https://iqcore.ai/api/public/v1/media/move",
    headers={"Authorization": f"Bearer {os.environ['IQCORE_KEY']}", "Idempotency-Key": str(uuid.uuid4())},
    json={
        "ids": [
            "<id>"
        ],
        "collection": "collection"
    },
)
print(res.status_code, res.json())
json
{
    "moved": 1,
    "message": "message"
}

Media storage

GET /media/usage

  • Operation media_usage
  • Scope media.read
  • Lowest role viewer
  • Read only
  • MCP media_usage

The account's media storage: number of library files, MB used (library files plus AI Chat attachments), of which chat MB, the plan's storage limit in MB (null means no limit) and the percentage used.

Parameters

  • organization_id query string — The organization to act in. Required when the key works in several organizations.

Response 200

  • files integer required — Media library files. min 0
  • used_mb number required — MB used: library files plus AI Chat attachments. min 0
  • chat_mb number required — Of which AI Chat attachments. min 0
  • limit_mb number | null required — The plan's storage limit in MB; null = no limit.
  • used_percent integer | null required — Share of the limit used; null without a limit. min 0 · max 100

Errors: 400 401 403 404 422 429 500 — codes

Example

curl
curl "https://iqcore.ai/api/public/v1/media/usage" \
  -H "Authorization: Bearer $IQCORE_KEY"
JavaScript
const res = await fetch("https://iqcore.ai/api/public/v1/media/usage", {
  headers: { Authorization: `Bearer ${process.env.IQCORE_KEY}` },
});
console.log(res.status, await res.json());
Python
import os
import requests

res = requests.get(
    "https://iqcore.ai/api/public/v1/media/usage",
    headers={"Authorization": f"Bearer {os.environ['IQCORE_KEY']}"},
)
print(res.status_code, res.json())
json
{
    "files": 1,
    "used_mb": 1.5,
    "chat_mb": 1.5,
    "limit_mb": 1.5,
    "used_percent": 1
}

Media file

GET /media/{id}

  • Operation media_get
  • Scope media.read
  • Lowest role viewer
  • Read only
  • MCP media_get

One Media library file by its id: name, kind, source, status (ready; pending while a URL import runs; failed with error {code, message}), file type, size, width and height, duration, sound, tags, collection, created_at, and signed links to the file, its thumbnail and poster (url, thumb_url, poster_url — bound to this API key, valid until urls_expire_at). Poll it after POST /media with a url until status is ready or failed.

Parameters

  • id path string required — The file id (uuid). max length 64
  • organization_id query string — The organization to act in. Required when the key works in several organizations.

Response 200

  • id string required — The file id (uuid).
  • name string required — The file name (data: it can come from an upload or a store). max length 120
  • kind string | null required — image, video or audio; null while a URL import is pending or after it failed.
  • source string required — upload, generated, edited, reel or product.
  • status string required — ready; pending while a URL import runs; failed (see error). One of: ready, pending, failed.
  • size_kb integer required min 0
  • duration_s number — Seconds (video / audio).
  • created_at string
  • updated_at string
  • size_bytes integer min 0
  • duration_ms integer min 0
  • mime_type string
  • width integer
  • height integer
  • has_audio boolean — A video has sound (the stored flag; absent when unknown).
  • tags array of string max items 20
  • collection object
    • id string required
    • name string required
  • source_url string — For a file imported from a URL: that URL without its query string. max length 300
  • url string — The file. API only: a signed link bound to this API key, valid until urls_expire_at (15 to 22.5 minutes); 404 once the key is revoked.
  • thumb_url string — The thumbnail (pictures, videos with a poster). API only: a signed link bound to this API key, valid until urls_expire_at (15 to 22.5 minutes); 404 once the key is revoked.
  • poster_url string — The poster frame (videos). API only: a signed link bound to this API key, valid until urls_expire_at (15 to 22.5 minutes); 404 once the key is revoked.
  • urls_expire_at string — When url / thumb_url / poster_url stop working. Read the file again for fresh links.
  • error object — status failed: why the import failed.
    • code string required — e.g. url_not_public, url_unresolvable, too_many_redirects, http_error, timeout, too_large, unsupported_file_type, file_too_large, storage_full, file_rejected.
    • message string required

Errors: 400 401 403 404 422 429 500 — codes

Example

curl
curl "https://iqcore.ai/api/public/v1/media/<id>" \
  -H "Authorization: Bearer $IQCORE_KEY"
JavaScript
const res = await fetch("https://iqcore.ai/api/public/v1/media/<id>", {
  headers: { Authorization: `Bearer ${process.env.IQCORE_KEY}` },
});
console.log(res.status, await res.json());
Python
import os
import requests

res = requests.get(
    "https://iqcore.ai/api/public/v1/media/<id>",
    headers={"Authorization": f"Bearer {os.environ['IQCORE_KEY']}"},
)
print(res.status_code, res.json())
json
{
    "id": "<id>",
    "name": "Summer sale",
    "kind": "kind",
    "source": "source",
    "status": "ready",
    "size_kb": 1,
    "duration_s": 1.5,
    "created_at": "2026-12-05T09:00:00Z",
    "updated_at": "2026-12-05T09:00:00Z",
    "size_bytes": 1,
    "duration_ms": 1,
    "mime_type": "mime_type",
    "width": 1,
    "height": 1,
    "has_audio": false,
    "tags": [
        "tag"
    ],
    "collection": {
        "id": "<id>",
        "name": "Summer sale"
    },
    "source_url": "https://example.com/page",
    "url": "https://example.com/picture.jpg",
    "thumb_url": "https://example.com/page",
    "poster_url": "https://example.com/page",
    "urls_expire_at": "2026-12-05T09:00:00Z",
    "error": {
        "code": "code",
        "message": "message"
    }
}

Rename or tag a file

PATCH /media/{id}

  • Operation media_update
  • Scope media.write
  • Lowest role member
  • Changes data
  • MCP media_update

Change one Media library file: its name, its tags (replaces the list) and / or its collection (a collection id, or null for none). What is left out keeps its value. Runs at once.

Parameters

  • id path string required — The file id. max length 64
  • Idempotency-Key header string — Your own id for this request (1–100 of A–Z a–z 0–9 . _ : -). The same key and request within 24 hours returns the first answer (Idempotent-Replayed: true) instead of acting twice; the same key with another request is refused (422 idempotency_key_reused); while the first one runs, 409 request_in_progress. Refusals before any effect are not stored.

Request body application/json

  • name string min length 1 · max length 200
  • tags array of string max items 30
  • collection string | null — A collection id, or null for none. max length 64
  • organization_id string — An organization id (uuid) of this key.

Response 200

  • id string required — The file id.
  • message string required — A short sentence for a person.

Errors: 400 401 403 404 409 422 429 500 — codes

Example

curl
curl -X PATCH "https://iqcore.ai/api/public/v1/media/<id>" \
  -H "Authorization: Bearer $IQCORE_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Summer sale"
}'
JavaScript
const res = await fetch("https://iqcore.ai/api/public/v1/media/<id>", {
  method: "PATCH",
  headers: { Authorization: `Bearer ${process.env.IQCORE_KEY}`, "Idempotency-Key": crypto.randomUUID(), "Content-Type": "application/json" },
  body: JSON.stringify({
      "name": "Summer sale"
  }),
});
console.log(res.status, await res.json());
Python
import os, uuid
import requests

res = requests.patch(
    "https://iqcore.ai/api/public/v1/media/<id>",
    headers={"Authorization": f"Bearer {os.environ['IQCORE_KEY']}", "Idempotency-Key": str(uuid.uuid4())},
    json={
        "name": "Summer sale"
    },
)
print(res.status_code, res.json())
json
{
    "id": "<id>",
    "message": "message"
}

Check a file for a platform

GET /media/{id}/validate

  • Operation media_validate
  • Scope media.read
  • Lowest role viewer
  • Read only
  • MCP media_validate

Check one Media library file (id from media_list) against a platform's media rules for a post format before posting: instagram, facebook, threads or tiktok; format post, reel or carousel (default: reel for a video, post for a picture). Returns ok (no errors), checks with code, severity (error or warning) and message, the rules used and the facts read from the file (size, pixels, length, codecs, frame rate, bit rate). Changes nothing.

Parameters

  • id path string required — The file id (uuid). max length 64
  • platform query string required — The platform to check for. One of: instagram, facebook, threads, tiktok.
  • format query string — The post format (default: reel for a video, post for a picture). story is not supported yet (422 unsupported_format). One of: post, reel, carousel, story.
  • organization_id query string — The organization to act in. Required when the key works in several organizations.

Response 200

  • media_id string required
  • platform string required
  • format string required
  • ok boolean required — No check has severity error.
  • checks array of object required max items 30
    • code string required — e.g. video_duration, video_codec, video_too_large, video_ratio, image_padded, image_file_too_large, format_mismatch.
    • severity string required One of: error, warning.
    • message string required
  • spec object | null required — The rules this file was checked against (MediaSpecs).
    • kinds array of string — The kinds of file this format takes.
    • image object
      • sent_as_is array of string — Picture types the publisher sends unchanged (others become a fresh JPEG).
      • as_is_max_bytes integer
      • converted_to string
      • min_width integer
      • min_width_action string
      • ratio array of number — Width ÷ height, from and to. min items 2 · max items 2
      • ratio_action string — padded (made to fit) or refused.
    • video object
      • containers array of string — File types.
      • video_codecs array of string — ffprobe codec names.
      • audio_codecs array of string — ffprobe codec names.
      • fps array of number — Frames per second, from and to. min items 2 · max items 2
      • max_width integer
      • min_side integer
      • max_side integer
      • ratio array of number — Width ÷ height, from and to. min items 2 · max items 2
      • duration_ms array of number — Length in milliseconds, from and to. min items 2 · max items 2
      • usual_max_ms integer
      • max_bytes integer
      • max_bitrate integer — Bits per second.
  • facts object required — What was read from the file (null = unknown).
    • kind string required
    • mime_type string | null
    • size_bytes integer required
    • width integer | null
    • height integer | null
    • duration_ms integer | null
    • video_codec string | null
    • audio_codec string | null
    • fps number | null
    • bitrate integer | null

Errors: 400 401 403 404 422 429 500 — codes

Example

curl
curl "https://iqcore.ai/api/public/v1/media/<id>/validate?platform=instagram" \
  -H "Authorization: Bearer $IQCORE_KEY"
JavaScript
const res = await fetch("https://iqcore.ai/api/public/v1/media/<id>/validate?platform=instagram", {
  headers: { Authorization: `Bearer ${process.env.IQCORE_KEY}` },
});
console.log(res.status, await res.json());
Python
import os
import requests

res = requests.get(
    "https://iqcore.ai/api/public/v1/media/<id>/validate?platform=instagram",
    headers={"Authorization": f"Bearer {os.environ['IQCORE_KEY']}"},
)
print(res.status_code, res.json())
json
{
    "media_id": "<media_id>",
    "platform": "platform",
    "format": "format",
    "ok": false,
    "checks": [
        {
            "code": "code",
            "severity": "error",
            "message": "message"
        }
    ],
    "spec": {
        "kinds": [
            "kind"
        ],
        "image": {
            "sent_as_is": [
                "sent_as_i"
            ],
            "as_is_max_bytes": 1,
            "converted_to": "converted_to",
            "min_width": 1,
            "min_width_action": "min_width_action",
            "ratio": [
                1.5
            ],
            "ratio_action": "ratio_action"
        },
        "video": {
            "containers": [
                "container"
            ],
            "video_codecs": [
                "video_codec"
            ],
            "audio_codecs": [
                "audio_codec"
            ],
            "fps": [
                1.5
            ],
            "max_width": 1,
            "min_side": 1,
            "max_side": 1,
            "ratio": [
                1.5
            ],
            "duration_ms": [
                1.5
            ],
            "usual_max_ms": 1,
            "max_bytes": 1,
            "max_bitrate": 1
        }
    },
    "facts": {
        "kind": "kind",
        "mime_type": "mime_type",
        "size_bytes": 1,
        "width": 1,
        "height": 1,
        "duration_ms": 1,
        "video_codec": "video_codec",
        "audio_codec": "audio_codec",
        "fps": 1.5,
        "bitrate": 1
    }
}