Skip to content

// docs › ai

AI

archhy can draw a diagram from a description, or change the one on the canvas when you ask. It uses your own key from an AI provider, or, on Pro, archhy's AI credits.

Open the editor

On this page
  1. Providers
  2. Add your key
  3. How archhy chooses
  4. AI credits
  5. On a computer
  6. On a phone
  7. When something goes wrong
  8. How to write edits
  9. What archhy does with the answer
  10. What an edit keeps

Providers

  • You can bring your own key from Google Gemini or OpenAI. AI Settings shows a section for each, with a Get a key link to that provider's own page and a line saying what its keys look like.
  • You never pick an AI model: archhy chooses the right one for each job (generate, edit, cheat sheets, a picture, Mermaid, a title).
  • Each AI request on your own key goes from your browser straight to the provider, with your key. It does not pass through archhy.

Add your key

  • Get a key from one of the providers listed in AI Settings, using its Get a key link.
  • Open Settings ▸ App ▸ AI settings. On a phone: More ▸ AI settings. Signed in, your account menu's AI model keys opens the same place.
  • Paste the key under its provider, press Save, then Test connectivity. The test asks the provider's first approved model and says which model answered.
  • archhy checks the key's shape before saving it. A key pasted under the wrong provider, or with a space or line break inside it, is refused with what was expected.
  • In the same place you can set the AI's behaviour.
  • Your key stays in this browser unless you save it to your account. Signing out removes keys from this browser. A key saved to your account fills in again whenever you sign in, on this or any other device.
  • Until a key is saved, the AI panels say No AI models configured, with a button that opens AI Settings, unless your plan includes AI credits (see below).

How archhy chooses

  • archhy picks the model for each job. There is no model to choose in the AI panel and no default model to set.
  • Your own key comes first. With a Gemini or OpenAI key, the job runs on your key and uses no credits. With both, Gemini is tried first, then OpenAI if Gemini fails.
  • Then AI credits, on Pro. With no key, a Pro account runs on AI credits. If your key fails (refused, out of credit, or the provider is busy), the job finishes on your AI credits and the footer says so. To stop that, turn off Use AI credits if my keys fail in AI Settings.
  • On Pro you can choose the model for your key: Model for this key under each key in AI Settings. Automatic (recommended) lets archhy pick the best model for each job.
  • Without a key and without credits (Free, Trial or signed out), the AI panels say to add a Gemini or OpenAI key, or to upgrade.

AI credits

  • On Pro, archhy includes AI credits each month: 200 on Pro, 100 on Lifetime. Signed out, Trial and Free have none; your own key works on every plan.
  • One credit is one US cent of what the AI provider charges archhy. A run is charged what it really used, rounded up, and never more than the cost shown before it starts.
  • The AI panel says who pays: Uses your key or Uses AI credits. Your own key always comes first.
  • Before a run the button shows the most it can cost, for example Generate · up to 5 credits, with the credits you have left this month. After it, the panel says what was used, for example Used 2 credits · 141 left.
  • A run that fails costs nothing, and says so: Nothing was charged.
  • Credits renew on the 1st of each month (UTC) and do not carry over. Your balance is in the account menu, for example AI credits · 143 of 200 left · renews 1 Dec.
  • When you do not have enough for a run, the panel says how many it needs and how many you have, and offers Use my own key (AI Settings) and See plans.
  • AI credits are for archhy's own AI tasks in the app: generate, edit with AI and cheat sheets. The API and the MCP server do not use them.
  • To keep things fair there are limits: a few runs a minute, a daily number of runs, and a size limit on what you send. Over a limit, the run is refused before anything is charged, and the words say when it lifts.
  • With AI credits, your description and diagram go to archhy's server, which asks the provider with archhy's key. archhy keeps only the numbers (tokens, credits and cost), not what you sent or the answer.

On a computer

Press AI in the left column. The AI drawer has three tabs: Edit JSON, Edit with AI and Generate with AI.

Generate with AI

  • Describe the diagram in the box. Choose the Cloud (Auto, AWS, Azure or Google Cloud) if you want to.
  • Press Generate. The AI's answer appears as JSON in the box below, where you can still change it.
  • Press Save to put it on the canvas, or close the drawer to throw it away. Putting it on the canvas is one undo step.

Edit with AI

  • Describe the change, then press Submit. The change goes straight onto the canvas; Undo takes it back.
  • Cancel stops a request that is still running.

Turn a picture into a diagram

File ▸ From an image… (also From an image in the AI drawer and on the start card) opens the image conversion wizard. It is part of the paid plans.

JPEG, WebP or SVG, up to 20 MB; an SVG is drawn into a picture in your browser first). You can also paste a screenshot, or drop a picture on an empty canvas.

text, crossing arrows or a photo taken at an angle. Add a few words to guide it if you like ("use the Google Cloud icons"), then press Convert.

could not read. Layout starts on As in the picture: each item where the picture has it, groups side by side or stacked as drawn, grown to hold what is in them. Left to right and Top to bottom tidy it in one direction instead. (When the AI could not say where things are, only the two directions are offered, starting on the way the picture reads.) Press Open diagram to open it in a new tab, Try again with different words, or Back to choose another picture. Nothing opens until you press Open diagram.

regions become groups; arrows become rails; a legend or title becomes a text box. archhy lays the diagram out tidily, so the arrangement can differ from the picture's.

archhy never keeps it.

  • Choose a picture of an architecture: a screenshot, an export from another tool, or a photo of a whiteboard (PNG,
  • Check shows your picture. The AI does its best to rebuild it, but it may miss or misread parts, especially small
  • Result says what it found (items, groups, arrows, text boxes), lists each group with what is in it, and says what it
  • Boxes become cards with archhy's AWS, Azure, Google Cloud or Kubernetes icons where the label names the product;
  • It needs a model that can read pictures. If none of yours can, the wizard says so and opens AI Settings.
  • The picture is made smaller in your browser and sent only to the AI provider (on AI credits, through archhy's server).

On a phone

Tap AI in the bottom toolbar. The AI sheet has Generate, Edit and JSON across the top. An empty canvas opens on Generate; a diagram opens on Edit.

  • Generate draws a new diagram in place of the one on the canvas. Edit changes the diagram you have.
  • While the AI works, the sheet shows its steps and the seconds so far, with Cancel.
  • When it finishes, the diagram is already on the canvas. The Result says how many items were added, changed and removed. New items are outlined green and changed items amber on the canvas.
  • Press Undo to put the canvas back as it was, with your words back in the box. Press Done to keep the result, or Ask for another change.
  • From a picture? opens the image conversion wizard, with Take a photo as well as choosing one (also More ▸ New diagram ▸ From an image…).
  • JSON shows the diagram as text, with Paste, Copy, Tidy and Download. It says whether the text is valid; Apply to canvas works only when it is. Discard drops your changes.

When something goes wrong

- Refused the key: the key is wrong or revoked. Check it in AI Settings. - No credit: the key works, but your account with that provider has no credit or balance left. Add credit with the provider, or add a key from the other provider. - Busy: the provider is overloaded or rate-limiting you. Wait a moment and try again. - Blocked: the provider refused the request, for its content, your region, or your account. archhy shows the provider's own short words, with any key hidden.

  • If a request fails, archhy says why: you are offline, the page went to the background (for example a locked phone), the connection dropped, or the provider's own error.
  • The provider's own errors are told apart:
  • Some models think before they answer and are slow (half a minute or more). Keep the screen open while they work.
  • Copy details copies what happened, for a bug report. It never includes your prompt or your key.

How to write edits

  • Say exactly what to change and what to keep.
  • Name items by their label and type, for example "NAT Gateway (EC2)" or "ALB in Public Subnet A".
  • If you want something removed, say so.
  • Ask for one small change at a time.
  • If items go missing, start with "Keep all existing nodes. Only apply the following change: …".

Safe, precise edits

  • "Rename NAT Gateway to NAT Gateway B and keep all nodes and connections."
  • "Add a Route 53 node in the AWS Cloud group and connect it to the existing ALB. Do not remove anything."
  • "Move the Bastion Host into the Public Subnet group; keep layout and all other nodes."
  • "Add a CloudWatch log group connected to the Lambda function; keep existing structure."

Edits that remove things

  • "Remove the old NAT Gateway and its edges, then add a new NAT Gateway in Private Subnet A."
  • "Consolidate the two ALBs into a single ALB; remove the unused one and reconnect edges."

Whole architectures

  • "Build a modern data analytics platform on AWS: multiple ingestion sources (SaaS, IoT, logs, flat files), streaming via Kinesis/MSK, Lake Formation + S3 lake, Glue/EMR processing, Athena + Redshift + OpenSearch analytics, QuickSight dashboards, and SageMaker for ML."
  • "Design a multi-account landing zone with a shared services VPC, centralized logging to S3, cross-account CloudTrail, and a security boundary group for guardrails."
  • "Create a real-time fraud detection stack: API Gateway → Lambda → Kinesis, stream enrichment in Flink, feature store in S3, and SageMaker model inference."
  • "A Kubernetes cluster with a control plane and two worker nodes."

What archhy does with the answer

Every diagram that comes in goes through the same steps, whether the AI wrote it (your key or AI credits), you opened or pasted a JSON file, or an agent sent it through the API or MCP:

  • A new diagram gets Clean rails unless it says otherwise; an edit keeps the diagram's Rail style.
  • It is laid out with your spacing (Settings ▸ Spacing; on a phone, More ▸ Spacing) when it has no positions, and each fan is centred on the item it comes from.
  • A text box too short for its text is made taller, and what is stacked under it moves down with it. Borderless text boxes in one column are closed up into one block.

A file, a link, a sample or a library diagram you saved keeps its layout: only a text box that is cutting off a whole line grows.

Suggestions

When the AI's diagram, or one you opened or pasted, has something worth a look (a fan that is off-centre, rails that could be Clean, text boxes stacked that would read better as one), a calm notice under the toolbar says N suggestions. It is the same on a computer, a tablet and a phone:

  • Show lists them. Tap or click one to select the items it names.
  • Dismiss (×) hides the notice. Nothing was changed because of a suggestion.

What an edit keeps

An AI edit never unlocks a locked item. It keeps a rail's hand-made route, line style and label place, and an item's label place, icon size and place and info box, unless you ask it to change them.

Preserve layout (soft)

  • On (the default): items keep their places and sizes. Only new items, or items moved into a different container, are placed by auto-layout.
  • Off: the whole diagram is laid out again.
  • The switch is in the Edit with AI tab.

Allow ID replacement

  • Off (the default): archhy keeps each item's existing ID where it can (matching by ID, then by label and type). This protects your layout and selection.
  • On: archhy takes whatever IDs the AI returns.
  • The switch is in AI Settings.