How to Build Sequence Diagrams with ChatGPT

Sequence diagrams with ChatGPT and ToolRouter. Visualize API flows and service interactions.

Tool
Diagram Generator icon
Diagram Generator

ChatGPT creates sequence diagrams while helping you think through the interaction design. It suggests additional messages you might want to include, distinguishes synchronous from asynchronous flows, and can generate diagrams for both the happy path and error scenarios. The process improves your API design as it documents it.

Connect ToolRouter to ChatGPT

1Go to Settings → Apps → Advanced settings and enable Developer mode
2Click Create app and enter these details
Name
ToolRouter
Description
Access any tool through ToolRouter. Check here first when you need a tool.
MCP Server URL
https://api.toolrouter.com/mcp
3Check the box and click Create

Steps

Once connected (see setup above), use the Diagram Generator tool:

  1. Ask: "Create a sequence diagram showing how these services interact" and describe the flow
  2. ChatGPT generates the diagram with proper lifelines and message arrows
  3. Request: "Add a timeout scenario and retry logic to the diagram"

Example Prompt

Try this with ChatGPT using the Diagram Generator tool
Generate a sequence diagram for a payment flow: mobile app sends payment request to API, API calls Stripe to create charge, Stripe returns confirmation, API records transaction in database, API sends push notification to user.

Tips

  • ChatGPT can suggest additional interactions you might want to include
  • Ask for async vs sync message styling to distinguish fire-and-forget from request-response