> ## Documentation Index
> Fetch the complete documentation index at: https://docs.modulex.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# ModuleX documentation

> Build, run, and automate AI workflows with ModuleX — the no-code canvas, AI Composer, managed knowledge (RAG), 175 integrations, and a developer API with JavaScript and Python SDKs.

export const MediaEmbed = ({id, type = 'screenshot', caption = '', ext, ratio = '16 / 9'}) => {
  const isVideo = type === 'video' || type === 'app_video';
  const resolvedExt = ext || (isVideo ? 'mp4' : type === 'screenshot' ? 'webp' : 'svg');
  const src = 'https://media.modulex.dev/' + id + '.' + resolvedExt;
  const [status, setStatus] = useState('loading');
  const [isDev, setIsDev] = useState(false);
  const [inView, setInView] = useState(false);
  const boxRef = useRef(null);
  useEffect(() => {
    if (typeof window === 'undefined') return;
    const h = window.location.hostname;
    setIsDev(h === 'localhost' || h === '127.0.0.1' || h.endsWith('.mintlify.app'));
  }, []);
  useEffect(() => {
    if (inView) return;
    if (typeof IntersectionObserver === 'undefined') {
      setInView(true);
      return;
    }
    const el = boxRef.current;
    if (!el) return;
    const io = new IntersectionObserver(entries => {
      if (entries.some(e => e.isIntersecting)) {
        setInView(true);
        io.disconnect();
      }
    }, {
      rootMargin: '300px'
    });
    io.observe(el);
    return () => io.disconnect();
  }, [inView]);
  if (status === 'missing') {
    if (!isDev) return null;
    return <div style={{
      display: 'flex',
      flexDirection: 'column',
      justifyContent: 'center',
      gap: '0.4rem',
      padding: '1rem 1.25rem',
      margin: '1.25rem 0',
      width: '100%',
      aspectRatio: ratio,
      boxSizing: 'border-box',
      border: '1px dashed rgba(128,128,128,0.45)',
      borderRadius: '0.75rem',
      background: 'rgba(128,128,128,0.06)',
      color: 'currentColor',
      fontSize: '0.85rem',
      lineHeight: 1.45
    }}>
        <div style={{
      display: 'flex',
      alignItems: 'center',
      gap: '0.5rem',
      opacity: 0.75
    }}>
          <span aria-hidden="true">🎬</span>
          <code style={{
      fontSize: '0.75rem'
    }}>{id}</code>
          <span style={{
      fontSize: '0.65rem',
      textTransform: 'uppercase',
      letterSpacing: '0.04em',
      padding: '0.1rem 0.4rem',
      borderRadius: '0.4rem',
      background: 'rgba(128,128,128,0.18)'
    }}>
            {type}
          </span>
        </div>
        <div style={{
      opacity: 0.9
    }}>{caption || 'Media not uploaded yet.'}</div>
        <div style={{
      fontSize: '0.7rem',
      opacity: 0.5
    }}>
          Upload to R2 as <code>{id}.{resolvedExt}</code> — preview only, hidden in production.
        </div>
      </div>;
  }
  const mediaStyle = {
    display: status === 'loaded' ? 'block' : 'none',
    width: '100%',
    height: 'auto',
    borderRadius: '0.75rem'
  };
  const media = isVideo ? <video src={inView ? src : undefined} autoPlay loop muted playsInline preload="metadata" onLoadedData={() => setStatus('loaded')} onError={() => setStatus('missing')} style={mediaStyle} /> : <img src={inView ? src : undefined} alt={caption} onLoad={() => setStatus('loaded')} onError={() => setStatus('missing')} style={mediaStyle} />;
  return <figure style={{
    margin: '1.25rem 0'
  }}>
      <div ref={boxRef} style={status === 'loaded' ? {
    width: '100%'
  } : {
    width: '100%',
    aspectRatio: ratio,
    borderRadius: '0.75rem',
    background: 'rgba(128,128,128,0.06)'
  }}>
        {media}
      </div>
      {status === 'loaded' && caption ? <figcaption style={{
    marginTop: '0.5rem',
    textAlign: 'center',
    fontSize: '0.85rem',
    opacity: 0.7
  }}>
          {caption}
        </figcaption> : null}
    </figure>;
};

ModuleX is an AI workflow orchestration platform. You describe a process in plain
language or draw it on a visual canvas, connect the tools and data you already
use, and run it with any major AI model — from chat, the API, or an SDK.

There are two ways to work with ModuleX, and you can mix them freely.

<CardGroup cols={2}>
  <Card title="Use the app (no code)" icon="layout-dashboard" href="/get-started/first-workflow">
    Build workflows on a collaborative visual canvas, generate them from a prompt
    with the [AI Composer](/concepts/ai-composer), and chat with the agentic
    [Assistant](/concepts/assistant) — no engineering required.
  </Card>

  <Card title="Use the API and SDKs (code)" icon="code" href="/get-started/first-api-call">
    Run the same workflows from your own software with the REST API or the
    official [JavaScript](/sdks/javascript) and [Python](/sdks/python) SDKs.
  </Card>
</CardGroup>

<MediaEmbed id="MX-MEDIA-1000" type="app_video" caption={"A 60-second product tour of the ModuleX app, from a prompt to a running workflow."} />

## Start here

Pick the path that matches how you want to begin.

<CardGroup cols={3}>
  <Card title="Quickstart" icon="rocket" href="/get-started/quickstart">
    Create an account, get an API key, and make your first authenticated call.
  </Card>

  <Card title="Run your first workflow" icon="play" href="/get-started/first-workflow">
    Build a workflow in the canvas or with the Composer, then run it from the app.
  </Card>

  <Card title="Make your first API call" icon="terminal" href="/get-started/first-api-call">
    Trigger a workflow from code in cURL, Python, or JavaScript.
  </Card>
</CardGroup>

## Explore the docs

<CardGroup cols={2}>
  <Card title="Concepts" icon="lightbulb" href="/concepts/overview">
    The mental model behind ModuleX: workflows and runs, the workflow engine and
    its nodes, the Composer and Assistant, knowledge and RAG, organizations, and
    credits.
  </Card>

  <Card title="API & SDKs" icon="plug" href="/api-reference/overview">
    The request lifecycle, authentication, errors, and every operation shown once
    in cURL, Python, and JavaScript — plus a live endpoint playground.
  </Card>

  <Card title="Integrations" icon="grid-2x2" href="/integrations/overview">
    Connect ModuleX to 175 services and call their tools from workflows and the
    Assistant.
  </Card>

  <Card title="Build & Assistant" icon="workflow" href="/platform/overview">
    A tour of the app: chat, the workflow builder, knowledge bases, realtime
    collaboration, and the agentic Assistant.
  </Card>
</CardGroup>

## What you can do with ModuleX

<CardGroup cols={2}>
  <Card title="Describe a workflow in words" icon="wand-sparkles" href="/concepts/ai-composer">
    The [AI Composer](/concepts/ai-composer) turns a plain-English description
    into an editable workflow graph — steps, tools, and logic laid out on the
    canvas for you to refine.
  </Card>

  <Card title="Build visually with your team" icon="users" href="/workflow-builder/overview">
    Multiple people can edit the same [workflow builder](/workflow-builder/overview)
    canvas at once, with live cursors, presence, and node locks.
  </Card>

  <Card title="Answer from your own knowledge" icon="book-open" href="/concepts/knowledge-rag">
    Connect documents to a [knowledge base](/platform/knowledge/overview) and let
    workflows and chat retrieve the right context automatically with RAG.
  </Card>

  <Card title="Run an agent that uses your tools" icon="bot" href="/assistant/overview">
    The [Assistant](/assistant/overview) is an agentic chat that searches your
    connected tools, drafts outputs, and pauses for approval before sensitive
    actions — no workflow required.
  </Card>
</CardGroup>

## Run a workflow from code

Every workflow you build in the app can be triggered programmatically. Each
request authenticates with an API key in the `Authorization` header and selects
your organization with the `X-Organization-ID` header.

<CodeGroup>
  ```bash cURL theme={null}
  curl https://api.modulex.dev/workflows/run \
    -H "Authorization: Bearer mx_live_4f8c2a1b9e7d6c5b4a3f2e1d0c9b8a7f" \
    -H "X-Organization-ID: org_3a7f19e2c4b8" \
    -H "Content-Type: application/json" \
    -d '{
      "workflow_id": "wf_9c1d4e7a2b6f",
      "input": { "topic": "quarterly sales summary" },
      "stream": true
    }'
  ```

  ```python Python theme={null}
  import asyncio
  from modulex import Modulex


  async def main():
      client = Modulex(
          api_key="mx_live_4f8c2a1b9e7d6c5b4a3f2e1d0c9b8a7f",
          organization_id="org_3a7f19e2c4b8",
      )
      run = await client.executions.run(
          workflow_id="wf_9c1d4e7a2b6f",
          input={"topic": "quarterly sales summary"},
          stream=True,
      )
      print(run.run_id, run.status)
      await client.close()


  asyncio.run(main())
  ```

  ```javascript JavaScript theme={null}
  import { Modulex } from 'modulex-js';

  const client = new Modulex({
    apiKey: 'mx_live_4f8c2a1b9e7d6c5b4a3f2e1d0c9b8a7f',
    organizationId: 'org_3a7f19e2c4b8',
  });

  const run = await client.executions.run({
    workflowId: 'wf_9c1d4e7a2b6f',
    input: { topic: 'quarterly sales summary' },
    stream: true,
  });

  console.log(run.run_id, run.status);
  ```
</CodeGroup>

<Note>
  Running a saved workflow requires an active deployment. Managed runs pass through
  ModuleX's billing gate and can return a `402`, `403`, or `429` denial when your
  plan's credits or limits are reached. See
  [errors & status codes](/api-reference/errors) and
  [usage gating & limits](/billing/usage-gating).
</Note>

For the full walkthrough — authenticate, run, and stream the result in three
languages — see [Run a workflow (REST + SDK)](/guides/run-a-workflow).

## How billing works, in one line

Managed usage is metered in **credits**: 100 credits equal \$1.00. Each plan
includes a monthly credit allowance, and paid organizations can add a prepaid
wallet for usage beyond it. If you bring your own model and tool keys (BYOK), that
usage is billed directly by the provider and is not credited. See
[billing & credits overview](/billing/overview) and
[plans & pricing](/billing/plans).

## Get help

<CardGroup cols={3}>
  <Card title="Help center" icon="circle-help" href="/help/getting-started">
    Short answers for getting going, using ModuleX, and troubleshooting.
  </Card>

  <Card title="Glossary" icon="book-a" href="/reference/glossary">
    Canonical ModuleX terminology in one place.
  </Card>

  <Card title="Known limitations" icon="triangle-alert" href="/reference/known-limitations">
    Documented gaps and paths you should not rely on yet.
  </Card>
</CardGroup>
