Skip to main content

Developer

AdVizion API

Integrate our analysis, decision report, and generation pipeline into your stack. Every developer endpoint accepts either an x-api-key header or a standard Authorization: Bearer token. Premium and Enterprise subscribers can generate an API key below.

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.

Authentication

Send one of the following on every request:

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

Same key works on every endpoint below. The Cognito Bearer token is what the web UI uses; the API key is for scripts, automations, and CI. Both share the same per-user credit balance — Premium and Enterprise subscribers run without credit deductions.

Endpoints

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/AdVizion marketing agent — chat funnel that builds ads from a brief.
  • POST/advertisement_analysis/First-pass AdVizion AI Coach on uploaded images.

Image & Video Generation

  • 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

  • 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/statusIs the caller connected to Google Ads?
  • GET/api/google-ads/accountsList accessible customer IDs.
  • POST/api/google-ads/deployCreate a paused campaign and persist a deploy record.
  • 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 deployed campaign.

Admin

  • POST/api/admin/users/{user_id}/grantAdmin: grant enterprise + API key to another user.
  • POST/api/admin/users/{user_id}/rotate-keyAdmin: rotate a user's API key.

Base URL: production is https://advizion.ai. The Next.js front-end relays paths to FastAPI on port 8000 internally.

Onboard your team

Enterprise admins can grant other users full API access (no credit deductions) without going through Stripe Checkout:

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

The response returns the new api_key. Share it via a secrets manager (1Password, Bitwarden, AWS Secrets Manager) — never paste keys into chat or commit them to git. Talk to sales to enable enterprise grants for your tenant.

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,
});