Your visitors are tired of typing into boxes. Let their AI do it. Make a form with AI Form API, then paste one script tag where the form should show. The form appears in a frame on your page and grows to fit. Answers come to us, and you read them when you want.
Step 1: make the form
Sign in at aiformapi.com/login with your email. You get a link, no password. Make a new form in the dashboard, or use a template. You can also make one with the API. The quickstart shows how.
Step 2: copy the slug
Every form has a public link, such as https://aiformapi.com/f/k3p9x2m7qa. The last part, k3p9x2m7qa, is the slug. The dashboard shows the snippet for your form with a copy button.
Step 3: paste the snippet
Paste this where you want the form to show. Replace the slug with yours.
<script src="https://aiformapi.com/embed.js" data-form="k3p9x2m7qa" data-title="Contact us"></script>data-title is optional. It names the frame for screen readers.
A complete page
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Friday dinner</title>
</head>
<body>
<main style="max-width: 640px; margin: 2rem auto; padding: 0 1rem;">
<h1>Friday dinner</h1>
<p>Tell us if you can come.</p>
<script src="https://aiformapi.com/embed.js" data-form="k3p9x2m7qa"></script>
</main>
</body>
</html>Where to paste it on a platform
Use the same place as in the platform guides. Only the snippet is different.
| Platform | Where the snippet goes |
|---|---|
| WordPress | A Custom HTML block, see the steps |
| Webflow | A Code Embed element, see the steps |
| Shopify | A Custom Liquid section, see the steps |
| Squarespace | A Code Block set to HTML, see the steps |
| Wix | Not the script. Use Embed a site with your form's link, see the steps |
What I checked
I put the script on a page that comes from a different address than the form, which is how your site will be. The form appeared in a frame, grew to fit, and showed the agent fill card. I filled it and pressed Send. The answer was stored.
Good to know
- The frame loads the form from AI Form API. It is not a copy. If you change the form, the page shows the change at once.
- Only the form pages can be framed. That is by design.
- Read more in the embed docs.
Sources (read 2026-10-30)
Questions
Where do the answers go when I embed a form?
They go to AI Form API, not to your page. Your page does not see them. You read them in the dashboard, as JSON or CSV through the API, or by signed webhook. The form counts against your plan: the free plan has 3 open forms and 100 responses a month.
Can my visitor's AI fill the embedded form?
Yes. The embedded form shows the card Want your AI agent to fill this? when agent fill is on for the form. The visitor copies a prompt, gives it to their AI, and either pastes the answer back or lets an AI with tools send it.
Does the embedded form grow to fit its content?
Yes. The script makes an iframe and the form tells the iframe how tall it is, so you see no inner scrollbar. If you use a plain iframe on a platform that has no script option, you must set the height yourself.