Skip to main content

Developer

API and MCP documentation

Connect an AI assistant to AdVizion with MCP, or call the same operations over HTTP. Both use your AdVizion account and see only the projects you can already open. A RUN, FIX, or REJECT recommendation is not approval to publish.

Connect an AI assistant (MCP)

AdVizion runs a remote MCP server. Add this address to your assistant, sign in to AdVizion when it asks, and click Allow.

https://www.advizion.ai/mcp

Use the address exactly as shown, including www. It speaks Streamable HTTP. Opening it in a browser shows a status page instead.

Then ask things like “List my AdVizion projects” or “Analyze the latest creative in my Spring launch project and tell me RUN, FIX, or REJECT.”

Claude (web, desktop, and mobile)

  1. Open Customize, Connectors and click Add custom connector.
  2. Name it AdVizion and enter the server address above. Keep the recommended sign-in options, then click Add.
  3. Click Connect, sign in to AdVizion, and click Allow.

On Team and Enterprise plans an Owner adds the connector once in Organization settings, Connectors (Add, Custom, Web). Each member then clicks Connect.

ChatGPT

  1. In Settings, Apps, Advanced settings, turn on Developer mode.
  2. In Settings, Apps, click Create. Name it AdVizion, enter the server address, and choose OAuth.
  3. Click Scan Tools, sign in to AdVizion, click Allow, then Create.

OpenAI offers custom MCP apps with every tool on ChatGPT Business, Enterprise, and Edu. A workspace admin may need to enable developer mode first.

Cursor

Add this to ~/.cursor/mcp.json, or to .cursor/mcp.json in one project:

{
  "mcpServers": {
    "advizion": {
      "url": "https://www.advizion.ai/mcp"
    }
  }
}

In Cursor Settings, Tools & MCP, click Needs login next to advizion, sign in, and click Allow.

Claude Code

claude mcp add --transport http advizion https://www.advizion.ai/mcp

Then run /mcp in Claude Code, choose advizion, and pick Authenticate.

VS Code (GitHub Copilot agent mode)

Add this to .vscode/mcp.json:

{
  "servers": {
    "advizion": {
      "type": "http",
      "url": "https://www.advizion.ai/mcp"
    }
  }
}

Click Start above the entry and sign in when VS Code asks.

Gemini CLI

Add this to ~/.gemini/settings.json:

{
  "mcpServers": {
    "advizion": {
      "httpUrl": "https://www.advizion.ai/mcp"
    }
  }
}

Then run /mcp auth advizion.

Other assistants

Any client that supports remote MCP servers over Streamable HTTP with OAuth works with the same address. A client that cannot sign in can send an API key instead, as shown in the next section.

Sign-in and permissions

Signing in from an assistant

Your assistant opens an AdVizion page that names the app, shows where you will return, and lists what it can do. Access lasts an hour and renews automatically for 30 days. To disconnect an app, open Account, API, Connected apps. Its access stops right away.

PermissionWhat it allows
advizion.readRead projects, creatives, brand rulebooks, and analysis results.
advizion.analyzeQuote and start analyses and governance checks. An analysis uses credits.

No app can buy credits, generate ads, publish campaigns, approve a creative, or delete anything through AdVizion MCP or this API.

Using an API key instead

Scripts and assistants without OAuth can send a key as Authorization: Bearer advz_… or x-api-key: advz_…. A full-access key can read and analyze. A read-only key can read. Keys are available on eligible Premium and Enterprise plans; see Your API key. Keep the key in an environment variable, not in a file you share.

{
  "mcpServers": {
    "advizion": {
      "url": "https://www.advizion.ai/mcp",
      "headers": {
        "Authorization": "Bearer ${env:ADVIZION_API_KEY}"
      }
    }
  }
}
claude mcp add --transport http advizion https://www.advizion.ai/mcp \
  --header "Authorization: Bearer $ADVIZION_API_KEY"

For client developers

Tools

A typical session runs list_projects, list_creatives, quote_analysis, start_analysis, then get_analysis_status until the verdict is ready.

  • get_profileread

    Return the AdVizion account connected to this client.

  • list_projectsread

    List projects this account can open. Start here to get a project_id.

  • get_project_contextread

    Return the campaign objective, audience, and applicable rulebooks for one accessible project.

  • list_creativesread

    List the creatives saved in a project with their latest version id. Use latest_version_id as creative_version_id when quoting or starting an analysis.

  • quote_analysisanalyze

    Report the credit cost of analyzing one image, video, or audio creative. This does not start work. With a creative_version_id, an earlier identical analysis is reused at no cost.

  • start_analysisanalyze

    Start a real AdVizion analysis of one saved creative version and return the review id. It spends credits, never more than max_credits; call quote_analysis first. Reusing the same idempotency_key returns the same review. Poll get_analysis_status for the RUN, FIX, or REJECT verdict. A verdict is not human approval.

  • get_analysis_statusread

    Return the status of an analysis this account can see, and each item's RUN, FIX, or REJECT verdict once its Decision Report exists.

  • get_brand_rulebookread

    List the rulebooks that apply to a project, including status and version.

  • run_governance_checkanalyze

    Check a project, or one creative version in it, against one active rulebook. The verdict is automated. It is not legal clearance.

  • compare_creativesread

    Compare two stored Decision Report verdicts for a stated objective. This does not invent a new score.

REST API

The same operations over HTTP, with the same sign-in. Base URL:

https://www.advizion.ai/api/public/v1
  • GET/meWho is connected
  • GET/projectsFind projects
  • GET/projects/{project_id}Read project context
  • GET/projects/{project_id}/creativesList creatives
  • POST/analyses/quoteQuote an analysis
  • POST/analysesStart analysis
  • GET/analyses/{review_id}Analysis status
  • GET/projects/{project_id}/rulebooksBrand rulebook
  • POST/projects/{project_id}/governanceRun governance
  • POST/projects/{project_id}/comparisonsCompare stored verdicts

Request and response shapes are in the OpenAPI file.

curl https://www.advizion.ai/api/public/v1/projects \
  -H "Authorization: Bearer $ADVIZION_API_KEY"
curl -X POST https://www.advizion.ai/api/public/v1/analyses \
  -H "Authorization: Bearer $ADVIZION_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"project_id": "PROJECT_ID", "creative_version_id": "VERSION_ID",
       "media_type": "image", "idempotency_key": "spring-hero-v3-0001", "max_credits": 10}'

Limits and errors

  • Each account can start 30 analyses and 30 governance checks per hour.
  • start_analysis never spends more than max_credits. Retrying with the same idempotency_key returns the same analysis. The same key with different inputs is refused.
  • 401: sign in again, or check the key. 403: the key or token lacks the permission, or your account cannot use that project.
  • 404: not found, or not visible to your account. 429: the hourly limit was reached.
  • In MCP, a sign-in problem returns HTTP 401 so your assistant can ask you to sign in. Other problems come back as a tool result marked as an error, with a message the assistant can show you.

Your API key

Programmatic requests use the x-api-key header (not your login password). Browser sessions use Cognito Bearer tokens; API automations use this key.

Sign in to reveal or refresh your API key.

Product API

These are the endpoints the AdVizion web app uses, including generation and Google Ads. They can change. For an integration, use the MCP server or the REST API above. Send one of these headers:

x-api-key: YOUR_API_KEY
# or
Authorization: Bearer YOUR_COGNITO_ACCESS_TOKEN

The Cognito Bearer token is what the web app uses. A key can call only the scopes granted to it, and usage and credit limits still apply. Rotate or revoke a key from Account when access changes.

Analysis

  • POST/api/upload/Image saliency / sequence / brand attention / complexity (multipart).
  • POST/api/video/Video saliency + brand attention + complexity (multipart).
  • POST/upload_video/Same as /api/video/ — used by the web UI.
  • POST/api/video_understanding/AdVizion video intelligence analysis (markdown summary).
  • POST/api/emotional_prediction_analysis/Emotional sentiment per image.
  • POST/api/customer_intent_analysis/Predicted intent action + reason.
  • POST/api/reverse_image_search_upload/Reverse image search + uniqueness score.
  • POST/api/asr_transcription/Audio / video transcription with timestamps.
  • POST/api/resolve_media_url/Resolve a YouTube/TikTok/IG URL to an S3 URL.

Decision Report & Chat

  • POST/api/decision_report/AdVizion Decision Report for an image or video.
  • POST/api/chat/Unified multimodal coach (image/video/asr/comparison/decision modes).
  • POST/api/marketing_agent/Ad Copilot: build an editable brief; generation requires the returned quote and explicit confirmation.
  • POST/advertisement_analysis/First-pass AdVizion AI Coach on uploaded images.

Image & Video Generation

  • GET/api/generation/capabilitiesRead supported media, output sizes, and source-edit availability.
  • POST/api/generation/image-quoteBind an image quote to variant count, size, analysis and creation context.
  • POST/api/generation/video-quoteQuote a scenario, render, composition or supported source edit.
  • GET/api/generation/operations/{id}Resume a saved generation operation without resubmitting paid work.
  • POST/api/generation/operations/{id}/cancelRequest cancellation and reconcile any already accepted provider work.
  • POST/api/ai-visual-editor/AdVizion image generation / editing.
  • POST/api/video_generate/scenarioAdVizion scenario writer (1-4 × 8s segments).
  • POST/api/video_generate/segmentRender one 8-second video segment (chained via last-frame).
  • POST/api/video_generate/Orchestrator — scenario + segments + concat + auto-analyze.

Projects, Decisions & Sharing

  • POST/api/v2/brief-importsExtract PDF or DOCX sources into an editable brief and Brand Rules with provenance and conflicts.
  • POST/api/v2/brief-imports/{id}/rerunDraft the proposal again from the saved document text for an import that failed or awaits review.
  • POST/api/v2/brief-imports/{id}/confirmConfirm the reviewed revision before creating or updating project context.
  • POST/api/v2/creation-draftsSave a revisioned creation brief, exact source versions and operation reference.
  • GET/api/projects/List the caller's projects.
  • POST/api/projects/Create a project (brief + brand + platforms).
  • GET/api/projects/{id}Get one project + roll-up counts.
  • GET/api/projects/{id}/itemsList analyses + generated versions in a project.
  • POST/api/projects/{id}/decisionsSave a Run/Fix/Reject decision to the project.
  • POST/api/projects/{id}/learningsSave a learning.
  • GET/api/projects/{id}/google-ads/deploysList Google Ads deploys for a project.
  • POST/api/share/{item_id}Create a public share link for an item.

Google Ads

  • GET/api/google-ads/capabilitiesVerify account eligibility before native creation or launch.
  • POST/api/google-ads/deploys/{id}/actionsOwner-approved native launch, pause or bounded budget changes with a verified campaign and current review.
  • POST/api/google-ads/deploys/{id}/reconcileReconcile asynchronous uploads and uncertain provider requests.
  • POST/api/google-ads/deploys/{id}/optimization-proposalsCreate an evidence-linked editable proposal. Generation and ad replacement each require separate confirmation.
  • GET/api/google-ads/statusIs the caller connected to Google Ads?
  • GET/api/google-ads/accountsList Google Ads accounts the connected Google user can access.
  • POST/api/google-ads/deployPrepare supported paused Demand Gen image or video campaigns when native capability checks pass. Unsupported handoffs are labeled separately.
  • GET/api/google-ads/deploysList all Google Ads deploys for the caller.
  • GET/api/google-ads/deploys/{id}/metricsFetch cached or live campaign metrics.
  • POST/api/google-ads/deploys/{id}/statusPause a campaign previously created through AdVizion. PAUSED is the only accepted status.

Campaign Decisions

  • GET/api/campaign-decisionsList STOP/SCALE/FIX/RELAUNCH/KEEP TESTING events.
  • GET/api/projects/{id}/campaign-decisionsList campaign decision events for one project.
  • POST/api/campaign-decisions/evaluateCreate an explicit during-campaign recommendation event.

Operator-only legacy utilities

  • POST/api/admin/users/{user_id}/grantOperator-only legacy entitlement migration utility; not a collaboration or membership API.
  • POST/api/admin/users/{user_id}/rotate-keyOperator-only legacy key rotation utility.

Base URL: https://www.advizion.ai.

Examples

const formData = new FormData();
formData.append('file', fileInput.files[0]);
formData.append('prediction_type', 'saliency');
formData.append('condition', '2');

fetch('https://advizion.ai/api/upload/', {
  method: 'POST',
  headers: { 'x-api-key': 'YOUR_API_KEY' },
  body: formData,
});

Operator-only legacy utilities

These preserved endpoints support controlled entitlement migration and incident recovery. They require the existing operator authorization and do not create workspace membership, invitations, assignments, or unrestricted API access:

curl -X POST \
  -H "Authorization: Bearer $ADMIN_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"role":"tester","rotate_key":true}' \
  https://www.advizion.ai/api/admin/users/$TEAMMATE_USER_ID/grant

A successful rotation can return a one-time key secret. Transfer it through an approved secrets manager — never paste keys into chat or commit them to git. For project and workspace collaboration, use in-product email invites rather than this operator grant. Talk to sales to scope supported Enterprise access.