{
  "name": "MomentIQ.dev AI Agent Setup",
  "version": "2026-06-09",
  "product": {
    "name": "MomentIQ.dev",
    "summary": "AI-ready media timeline APIs for finding the moments that matter in video and audio.",
    "disambiguation": "MomentIQ.dev is a developer API for AI video and audio apps. It is separate from influencer marketing, creator marketplace, or TikTok Shop partner products using the MomentIQ name.",
    "best_for": [
      "AI agents building media workflows",
      "Developers adding media intelligence to apps",
      "No-code users testing media tools in Moment Lab"
    ]
  },
  "human_paths": {
    "start_here": "https://momentiq.dev/docs-setup.html",
    "markdown_setup": "https://momentiq.dev/docs/setup.md",
    "setup_simplicity_roadmap": "https://momentiq.dev/docs/setup-simplicity-roadmap.md",
    "agent_examples": "https://momentiq.dev/docs/agent-examples.md",
    "openapi": "https://momentiq.dev/openapi.json",
    "mcp_config": "https://momentiq.dev/mcp.json",
    "well_known_mcp_config": "https://momentiq.dev/.well-known/mcp.json",
    "no_code_testing": "https://momentiq.dev/",
    "developer_docs": "https://momentiq.dev/docs.html",
    "sdk_quickstart": "https://momentiq.dev/docs/sdk-quickstart.md",
    "ai_agent_setup": "https://momentiq.dev/docs-ai-agents.html",
    "chatgpt_connector": "https://momentiq.dev/docs-chatgpt.html",
    "claude_connector": "https://momentiq.dev/docs-claude.html",
    "privacy": "https://momentiq.dev/privacy.html",
    "terms": "https://momentiq.dev/terms.html",
    "data_retention": "https://momentiq.dev/data-retention.html",
    "support": "https://momentiq.dev/contact.html",
    "dashboard_signup_login": "https://momentiq.dev/dashboard.html?auth=signup",
    "api_keys": "https://momentiq.dev/dashboard-api-keys.html",
    "spend_cap_settings": "https://momentiq.dev/dashboard-settings.html"
  },
  "beta_agent_smoke_test": {
    "purpose": "Prove an AI agent can use MomentIQ safely before real customer media or broad live billing.",
    "required_checks": [
      "Create or choose a scoped test API key and store it as MOMENTIQ_API_KEY.",
      "Set a hard spend cap and usage alert.",
      "Call momentiq.run_agent_diagnostics.",
      "Call momentiq.get_account_limits.",
      "Upload a small file with momentiq.create_upload or use a public media_url.",
      "Run energy_to_clip with momentiq.create_workflow_job, momentiq.get_job, and momentiq.continue_workflow_job.",
      "Confirm the final job returns a playable output URL.",
      "Confirm dashboard usage shows endpoint, API key, job_id, media seconds, and cost.",
      "Revoke the test key and confirm future calls return invalid_api_key."
    ],
    "copy_ready_prompt": "Run a MomentIQ beta smoke test. Use MOMENTIQ_API_KEY from server-side environment variables only. First call momentiq.run_agent_diagnostics and momentiq.get_account_limits. Then upload or use a public test media_url. Plan the energy_to_clip workflow with momentiq.create_workflow_job. Queue only the first step, poll with momentiq.get_job, then call momentiq.continue_workflow_job after each completed job. Show me the final output URL, estimated vs final cost, usage summary, and any errors with request_id/job_id. After the test, remind me to revoke the test key if I do not need it anymore."
  },
  "remote_mcp": {
    "type": "remote_http_mcp",
    "url": "https://api.momentiq.dev/mcp",
    "fallback_url": "https://momentiq-production-7fdd.up.railway.app/mcp",
    "manifest_url": "https://api.momentiq.dev/mcp/manifest",
    "status_url": "https://api.momentiq.dev/mcp/status",
    "protected_resource_metadata": "https://api.momentiq.dev/.well-known/oauth-protected-resource",
    "authorization_server_metadata": "https://api.momentiq.dev/.well-known/oauth-authorization-server",
    "authorization_endpoint": "https://api.momentiq.dev/api/auth/oauth/authorize",
    "token_endpoint": "https://api.momentiq.dev/api/auth/oauth/token",
    "auth_header": "Authorization: Bearer <MIQ_CONNECTOR_TOKEN>",
    "current_auth_mode": "connector_token",
    "public_connector_oauth_status": "client_config_required",
    "owner_action_list": "https://momentiq.dev/docs/mcp-owner-action-list.md",
    "connector_token_api": "POST https://api.momentiq.dev/api/dashboard/connectors after signing in to create a revocable connector token.",
    "connector_scopes": ["all", "video/*", "audio/*", "timeline/*"],
    "scope_guidance": "Use all for general ChatGPT/Claude access and account guardrails. Use group scopes when the agent should only run one endpoint family.",
    "requires_local_install": false,
    "requires_browser_clicking": false,
    "agent_auto_connects_from_website": false,
    "setup_rule": "First check whether the user's agent environment supports remote MCP tools. If yes, tell the user to connect the MomentIQ MCP URL with a revocable connector token. If no, use the REST API or SDK from backend code with a server-side API key. If the agent cannot use tools or backend code, send the user to Moment Lab.",
    "connectors": {
      "chatgpt": {
        "setup_page": "https://momentiq.dev/docs-chatgpt.html",
        "name": "MomentIQ.dev",
        "url": "https://api.momentiq.dev/mcp",
        "auth_header": "Authorization: Bearer <MIQ_CONNECTOR_TOKEN>",
        "first_safe_prompt": "Use the MomentIQ.dev connector. Do not create uploads or processing jobs yet. First call momentiq.get_agent_guide, then momentiq.list_endpoints, then momentiq.run_agent_diagnostics if authenticated tools are available."
      },
      "claude": {
        "setup_page": "https://momentiq.dev/docs-claude.html",
        "name": "momentiq",
        "url": "https://api.momentiq.dev/mcp",
        "auth_header": "Authorization: Bearer <MIQ_CONNECTOR_TOKEN>",
        "first_safe_prompt": "Use the MomentIQ.dev MCP connector if you have it available. Do not create uploads or processing jobs yet. First call momentiq.get_agent_guide, then momentiq.plan_integration, then momentiq.run_agent_diagnostics if authenticated tools are available."
      }
    },
    "notes": [
      "Use the remote MCP when the agent supports remote MCP tools.",
      "Do not ask the user to clone MomentIQ or run a local MCP server.",
      "Prefer a revocable MIQ_CONNECTOR_TOKEN for public ChatGPT/Claude connector setup.",
      "Use MOMENTIQ_API_KEY for backend/API integrations only.",
      "Do not expose MomentIQ API keys or connector tokens in browser JavaScript, public prompts, screenshots, or shared documents."
    ]
  },
  "billing_and_safety": {
    "free_credits_usd": 5,
    "billing_model": "usage_only",
    "subscription_required": false,
    "after_free_credits": "Billing must be active before more paid processing can run.",
    "failed_jobs_billed": false,
    "spend_caps": "Users can set hard monthly spend caps in dashboard settings.",
    "revoked_keys": "Revoked keys stop future requests immediately."
  },
  "mcp_tools": [
    {
      "name": "momentiq.get_agent_guide",
      "auth_required": false,
      "purpose": "Return a concise guide an AI agent can use to build with MomentIQ safely."
    },
    {
      "name": "momentiq.list_endpoints",
      "auth_required": false,
      "purpose": "List MomentIQ endpoint groups, paths, pricing units, and current prices."
    },
    {
      "name": "momentiq.get_endpoint_schema",
      "auth_required": false,
      "purpose": "Return exact params, required fields, request examples, response fields, pricing, docs URL, and live/preview status for one endpoint."
    },
    {
      "name": "momentiq.estimate_cost",
      "auth_required": false,
      "purpose": "Estimate usage cost before creating a job. This does not spend credits."
    },
    {
      "name": "momentiq.list_workflows",
      "auth_required": false,
      "purpose": "List recommended endpoint chains for creators, developers, and AI agents."
    },
    {
      "name": "momentiq.plan_integration",
      "auth_required": false,
      "purpose": "Turn a plain-language user goal into a concrete app/API/MCP integration plan with endpoints, architecture, UI, backend helpers, env vars, safety checks, and a copy-ready agent prompt."
    },
    {
      "name": "momentiq.get_code_example",
      "auth_required": false,
      "purpose": "Return copy-paste-safe Node.js, Python, or curl examples for a MomentIQ endpoint or workflow, including upload, job creation, polling, and result extraction."
    },
    {
      "name": "momentiq.check_job_readiness",
      "auth_required": true,
      "purpose": "Validate a job request before spending credits, including media input, timestamps, preview status, estimate, billing, and spend caps."
    },
    {
      "name": "momentiq.run_agent_diagnostics",
      "auth_required": true,
      "purpose": "Check whether the authenticated account is ready for safe agent use, including storage, workers, billing, free credits, spend cap, alerts, and next actions."
    },
    {
      "name": "momentiq.create_workflow_job",
      "auth_required": true,
      "purpose": "Plan a recommended endpoint chain, estimate the steps, and optionally queue only the first worker job."
    },
    {
      "name": "momentiq.continue_workflow_job",
      "auth_required": true,
      "purpose": "Continue a multi-step workflow after a completed job by reading prior results, suggesting the next timestamp-aware step, and optionally queueing only that next step."
    },
    {
      "name": "momentiq.create_upload",
      "auth_required": true,
      "purpose": "Create a signed upload URL for a local media file. PUT the file bytes to upload_url with upload_headers, then use the returned media_url in readiness checks and jobs."
    },
    {
      "name": "momentiq.create_job",
      "auth_required": true,
      "purpose": "Create a real worker-backed media processing job."
    },
    {
      "name": "momentiq.get_job",
      "auth_required": true,
      "purpose": "Poll a job until it is completed or failed."
    },
    {
      "name": "momentiq.get_job_result",
      "auth_required": true,
      "purpose": "Return a normalized result summary for a job, including output URLs, timeline segments, frames, counts, costs, errors, and next actions."
    },
    {
      "name": "momentiq.list_jobs",
      "auth_required": true,
      "purpose": "List recent account-scoped jobs with compact status, cost, timing, and output URL summaries so an agent can recover context without rerunning paid work."
    },
    {
      "name": "momentiq.get_usage_summary",
      "auth_required": true,
      "purpose": "Show usage, cost, free credits, spend cap, and usage by endpoint/API key."
    },
    {
      "name": "momentiq.get_account_limits",
      "auth_required": true,
      "purpose": "Show free credits, current usage, hard spend cap, usage alerts, and safety guidance before an agent runs jobs."
    },
    {
      "name": "momentiq.set_spend_cap",
      "auth_required": true,
      "purpose": "Set a hard monthly spend cap and optional usage alerts for the authenticated account."
    },
    {
      "name": "momentiq.create_billing_link",
      "auth_required": true,
      "purpose": "Create a Stripe Checkout or customer portal link when free credits are gone or billing needs management."
    },
    {
      "name": "momentiq.regenerate_output_url",
      "auth_required": true,
      "purpose": "Regenerate fresh signed URLs for stored R2 outputs from a completed job without rerunning processing."
    },
    {
      "name": "momentiq.list_api_keys",
      "auth_required": true,
      "purpose": "List API keys without exposing full secrets."
    },
    {
      "name": "momentiq.create_api_key",
      "auth_required": true,
      "purpose": "Create a scoped API key for an app or AI agent. The full secret is returned once."
    },
    {
      "name": "momentiq.revoke_api_key",
      "auth_required": true,
      "purpose": "Revoke an API key immediately."
    }
  ],
  "recommended_workflows": [
    {
      "goal": "Find funny clips",
      "chain": ["audio/detect-laughter", "audio/detect-silence", "video/clip-near"],
      "output": "Clip URLs with timestamps and JSON proof."
    },
    {
      "goal": "Remove dead space",
      "chain": ["audio/detect-silence", "timeline/suggest-ranges", "video/clip-window"],
      "output": "Suggested keep ranges and rendered clips."
    },
    {
      "goal": "Find exact words",
      "chain": ["audio/find-words", "video/clip-near"],
      "output": "Matching word timestamps and clip-ready ranges."
    },
    {
      "goal": "Pick thumbnails",
      "chain": ["video/best-frames", "video/thumbnail-score"],
      "output": "Ranked thumbnail candidates and scores."
    },
    {
      "goal": "Build searchable media memory",
      "chain": ["audio/semantic-chunks", "video/text-frames", "timeline/merge"],
      "output": "Timestamped media timeline objects for search or RAG."
    }
  ],
  "routing_guidance": {
    "unsure_user": "Send the user to https://momentiq.dev/docs-setup.html first.",
    "no_code_user": "Use Moment Lab at https://momentiq.dev/.",
    "developer": "Use the Quickstart and SDK docs.",
    "ai_agent_user": "Ask whether the agent supports remote MCP. If yes, create a MomentIQ connector token and connect https://api.momentiq.dev/mcp with Authorization: Bearer <MIQ_CONNECTOR_TOKEN>. If no, use REST API/SDK from backend code with a server-side API key."
  },
  "agent_prompt_template": "Build a media workflow using MomentIQ. Before using MomentIQ, check whether you have remote MCP/tool access. If you do not have MCP access, tell me exactly how to connect the MomentIQ remote MCP server, or fall back to server-side REST API/SDK code. For remote MCP, use a revocable MomentIQ connector token from the dashboard as MIQ_CONNECTOR_TOKEN. For backend REST/SDK code, use the API key from the server-side environment variable MOMENTIQ_API_KEY. If MCP is available, connect to https://api.momentiq.dev/mcp with Authorization: Bearer ${MIQ_CONNECTOR_TOKEN}. Call momentiq.plan_integration with the user's goal before coding. For local files, call momentiq.create_upload, PUT the bytes to upload_url with upload_headers, then use media_url in momentiq.check_job_readiness and jobs. For multi-step workflows, call momentiq.create_workflow_job first, poll the returned job, call momentiq.get_job_result for clean output fields, then call momentiq.continue_workflow_job after each completed step. If you lose the job_id, call momentiq.list_jobs before rerunning paid processing. Never expose the API key or connector token in browser code. Goal: [describe the user's media workflow]. Show upload progress, estimated cost, job progress, output preview, and download links.",
  "copy_ready_prompts": [
    {
      "name": "funny_clip_finder",
      "prompt": "Build me a podcast clip finder with MomentIQ. User flow: upload a video or paste a media URL, then return the 3 best funny clips with playable previews and download buttons. If remote MCP is supported, connect to https://api.momentiq.dev/mcp with Authorization: Bearer ${MIQ_CONNECTOR_TOKEN}. If you are writing backend code instead, read MOMENTIQ_API_KEY from server-side environment variables. Use this endpoint chain: audio/detect-laughter, audio/detect-silence, then video/clip-near or video/clip-window. Show upload progress, estimated cost, queued/running/completed job states, clip previews, JSON details behind a toggle, and errors with request_id/job_id. Never expose the MomentIQ API key or connector token in browser code."
    },
    {
      "name": "no_code_creator_page",
      "prompt": "Build a simple no-code MomentIQ page for content creators. The page should let a user choose a demo video or upload their own media, pick a MomentIQ tool, run it, preview the output, and download clips or CSV/JSON results. Use MomentIQ jobs from the backend. Read MOMENTIQ_API_KEY from server-side environment variables. Use signed upload URLs for local files, then pass the returned media_url into jobs. Start with these live-safe endpoints: video/clip-window, video/clip-near, audio/detect-silence, and audio/detect-energy. Hide raw JSON behind a details toggle. Use friendly labels for timestamps and costs. Never expose the MomentIQ API key in browser code."
    },
    {
      "name": "app_integration_service",
      "prompt": "Add MomentIQ media intelligence to my app. Create a backend module named momentiqService that can upload media, create jobs, poll jobs, and return clean results to the frontend. Read MOMENTIQ_API_KEY and MOMENTIQ_API_BASE_URL from server-side environment variables. Default MOMENTIQ_API_BASE_URL to https://api.momentiq.dev. Implement helpers for createUpload(fileName, contentType, fileSize), createJob(endpoint, media_url, settings), pollJob(job_id), clipWindow(media_url, start, end), and detectEnergy(media_url, settings). Add retry/backoff for polling, show request_id/job_id on errors, and never expose the MomentIQ API key to the browser."
    },
    {
      "name": "beta_agent_smoke_test",
      "prompt": "Run a MomentIQ beta smoke test. Use MOMENTIQ_API_KEY from server-side environment variables only. First call momentiq.run_agent_diagnostics and momentiq.get_account_limits. Then upload or use a public test media_url. Plan the energy_to_clip workflow with momentiq.create_workflow_job. Queue only the first step, poll with momentiq.get_job, call momentiq.get_job_result for clean output fields, then call momentiq.continue_workflow_job after each completed job. Show me the final output URL, estimated vs final cost, usage summary, and any errors with request_id/job_id. After the test, remind me to revoke the test key if I do not need it anymore."
    }
  ],
  "troubleshooting": {
    "missing_api_key": "Create or provide a MomentIQ API key in the agent environment.",
    "billing_required": "The account has no free credits remaining and needs billing active.",
    "invalid_api_key": "The key is wrong or revoked. Create a new key in the dashboard.",
    "unsupported_file_type": "Use supported audio/video formats such as mp4, mov, webm, mp3, wav, m4a, aac, or ogg.",
    "processing_failed": "Poll the job for error details and show the request_id/job_id to the user."
  }
}
