---
title: "Check an image or video before it becomes an ad"
method: POST
path: "/api/v1/tools/check_media/execute"
tags: ["Adako"]
---

# Check an image or video before it becomes an ad

`POST /api/v1/tools/check_media/execute`

## Request

- Base URL: `https://adako.ai`
- URL: `https://adako.ai/api/v1/tools/check_media/execute`
- Auth: HTTP bearer

Checks a creative file before any ad is built from it, and answers where a file with no link yet has to go.
Use when: the user offers an image or a video in any form — a link, a file on their computer, "the one from our site" — and always before a create tool that takes image_url or video_url.
What it does: repairs the share links that do not serve files (Drive, Dropbox, OneDrive, GitHub, Imgur have a direct form), fetches only the head of the file to read its type, size, dimensions and an MP4's duration, and reports slot by slot which platforms accept it and what would be cropped.
Call it with no arguments when the user has a file but no link: it returns the three ways to get one, cheapest first, starting with reusing what is already in their ad account.
Adako hosts nothing and never receives the file. The platform downloads the URL itself, from its own servers and often hours later, which is why a local path, a login-gated page or a link that expires cannot work however it is passed.
Free, instant, touches no ad account and creates nothing, so run it as often as needed. If a file is refused, say exactly which rule it broke and what to change — never retry a create with the same file.

## Headers

- `Idempotency-Key` string

## Request body

- object
  - `arguments` object
    - `urls` string[]: The file links to check, as the user gave them — share pages and http links are repaired rather than rejected. Leave this out to get the "where do I put my file" answer instead.
    - `platforms` string[]: Only judge these platforms. Defaults to all five, which is what to use when the user has not chosen yet.
    - `kind` 'image' | 'video': Only judge image slots or video slots. Defaults to what the file turns out to be.
    - `raw_data` boolean: Return compact JSON only (no markdown). Use when you will compute on the result.

## Response `200`

The tool ran. A write returns proposal_id and approve_url while the change waits for approval.

- SuccessEnvelope
  - `success` unknown, required
  - `tool` string, required
  - `data` object, required: Machine-readable result.
  - `markdown` string, required: The same result written for a person or a model.
  - `quota` Quota: Task usage for the current billing period.
    - `plan` string
    - `used` integer
    - `limit` integer
    - `period_end` string
    - `upgrade_url` string
  - `proposal_id` string: Present for writes. Nothing changes on the ad platform until it is approved.
  - `approve_url` string: Where a person approves the proposal.
  - `request_id` string, required

## Other responses

- `400`: Invalid arguments, or the ad account could not be resolved.
- `401`: Missing, invalid, revoked or expired API key.
- `402`: Monthly task quota used up, or the plan does not include this tool.
- `403`: The connected ad account lacks the access level this tool needs.
- `404`: Unknown tool name.
- `409`: Not connected, reconnect needed, confirmation required, a proposal already pending or no longer pending, an identical create that failed earlier today (proposal_failed_before), a create that duplicates an approved one (duplicate_create), the ad-account limit of the plan reached (account_limit), or an Idempotency-Key reused with different arguments.
- `429`: Rate limited by Adako or by the ad platform. See Retry-After.
- `500`: Unexpected error inside Adako.
- `502`: The ad platform returned an error.

---

[API](https://skmtc.dev/adako/apis/adako-rest-api.md) · [All operations](https://skmtc.dev/adako/apis/adako-rest-api/llms.txt) · [OpenAPI document](https://skmtc.dev/adako/apis/adako-rest-api/revisions/59ee60d48a56?raw)
