Embedding AI Agents
via Signed Access URLs
MindStudio allows you to embed your AI Agents seamlessly into your product or website, using signed access URLs—without requiring end users to sign up for a MindStudio account.
Overview
Signed access URLs provide secure access to a specific AI Agent for a specific user. These are particularly useful if you already manage your own user accounts and want to embed an agent without forcing additional authentication steps.
URLs expirations can be set (1 hour to infinite)
You can generate unlimited URLs
Old URLs do not expire when new ones are generated
How It Works
Your backend requests a signed access URL from the MindStudio API.
You optionally include your internal user ID (for run history tracking).
MindStudio responds with a signed URL.
You serve this URL to your user—via redirect or iframe.
If a userId is provided, run history for that user will be consistent across sessions. Otherwise, a new temporary user will be created each time.
Getting the Signed URL
Curl Example
curl -X POST https://api.mindstudio.ai/developer/v2/generate-signed-access-url \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"agentId": "AGENT_ID",
"userId": "your-external-user-id"
}'JavaScript (Fetch) Example
const response = await fetch('https://api.mindstudio.ai/developer/v2/generate-signed-access-url', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
agentId: 'AGENT_ID',
userId: 'your-external-user-id',
}),
});
const { url } = await response.json();
// Use the URL in an iframe or redirectExample Flow
Here’s how you can integrate it into your product:
User logs in to your app.
Frontend loads a secure route (e.g.,
/tools/my-agent).Frontend calls your backend, which:
Verifies the user’s session
Calls MindStudio’s
generate-signed-access-urlendpoint
Your backend returns the URL to the frontend.
Frontend embeds the agent in an
<iframe>:<iframe src="https://app.mindstudio.ai/signed-access/abc123..." width="100%" height="800px"></iframe>Or, you can redirect the user to the URL directly.
Best Practices
Always generate a new signed URL per session.
Never expose your API key in client-side code.
Getting Signed URLs Using Make.com
Prerequisites
A Make.com account
Your MindStudio API key
Your Agent’s ID
A backend HTTP module or webhook trigger (to retrieve or forward the signed URL)
Optional: A source for the user ID (e.g., webhook, form, database)
Step-by-Step with Make:
Create a Scenario: Start with a Webhook trigger from your frontend
Add HTTP Module: Use the HTTP → Make a Request module.
Configure the HTTP POST:
URL:
https://api.mindstudio.ai/developer/v2/generate-signed-access-urlMethod:
POSTHeaders:
KeyValueAuthorization
Bearer YOUR_API_KEY
Content-Type:
JSON (application/json)Body Type:
RawRequest content:
{ "agentId": "YOUR_AGENT_ID", "userId": "{{your_user_id_variable}}" }Parse the Response:
YesYou'll need to extract the
urlfield from the API response.
Use the Signed URL in the frontend iframe code.
Getting Signed URLs Using Zapier
Prerequisites
Zapier account
A MindStudio API key and Agent ID
Zapier Webhooks by Zapier (Premium trigger/action)
Optional: A source for the user ID (e.g., webhook, form, database)
Step-by-Step with Zapier:
Create a Zap: Start with a Webhook trigger from your frontend
Add Webhooks by Zapier – POST Request
URL:
https://api.mindstudio.ai/developer/v2/generate-signed-access-urlPayload Type:
JSONData:
KeyValueagentId
YOUR_AGENT_IDuserId
user_id_from_triggerHeaders:
KeyValueAuthorization
Bearer YOUR_API_KEYContent-Type
application/json
Extract the URL: Use the
urlfrom the webhook response in subsequent steps.Use the Signed URL in the frontend iframe code.
Getting Signed URLs Using n8n
Prerequisites
An active n8n instance
Your MindStudio API Key
The Agent ID you want to embed
Optional: A source for the user ID (e.g., webhook, form, database)
Step-by-Step with n8n:
Start with a Webhook trigger from your frontend
Add an HTTP Request Node
HTTP Method:
POSTURL:
https://api.mindstudio.ai/developer/v2/generate-signed-access-url
Authentication:
None (manual headers)Headers:
KeyValueAuthorization
Bearer YOUR_API_KEYContent-Type
application/jsonBody Content Type:
JSONJSON Parameters:
EnabledBody Parameters:
{ "agentId": "YOUR_AGENT_ID", "userId": "={{$json.userId}}" }
You can replace {{$json.userId}} with however you're passing in or storing user identifiers.
Extract the URL: After the HTTP node runs, you’ll get a response that includes a
urlfield.Use the Signed URL in the frontend iframe code.
Last updated