Agent Integration
Set up perstudio with OpenClaw, custom Claude agents, or any LLM-powered tool.
OpenClaw Setup
The fastest way to give your agent image and video generation. Three commands and you're done.
1. Install the skill
Install perstudio from ClawHub:
clawhub install perstudio
2. Configure your API key
Set your perstudio API key so the agent can authenticate:
openclaw config set skills.perstudio.apiKey "ps_live_your_key_here"
3. Agent discovers capabilities
Your agent auto-discovers perstudio's capabilities via the GET /agent/onboard endpoint. This returns a self-service payload optimized for LLMs — the agent learns what workflows are available and how to pick the right one.
# You can inspect the onboard payload yourself: curl https://api.perstudio.dev/agent/onboard \ -H "X-API-Key: ps_live_your_key_here"
4. Generate images
When a user asks for an image, the agent calls perstudio with a natural language intent. perstudio's intent router picks the right workflow automatically.
{
"tool": "perstudio_generate",
"parameters": {
"intent": "Create a professional product photo of the user's sneakers on a clean white background with dramatic side lighting"
}
}Custom Claude Agent
If you're building your own Claude-based agent with the Anthropic API, expose perstudio as a tool:
tools = [{
"name": "generate_image",
"description": "Generate images using AI. Send a natural language description and get production-quality images. Supports product photography, portraits, style transfer, ControlNet, upscaling, video, and more.",
"input_schema": {
"type": "object",
"properties": {
"intent": {
"type": "string",
"description": "Detailed description of the image to generate"
}
},
"required": ["intent"]
}
}]import requests
def handle_generate_image(intent: str) -> dict:
response = requests.post(
"https://api.perstudio.dev/generate",
headers={"X-API-Key": "ps_live_your_key_here"},
json={"intent": intent}
)
return response.json()MCP Server
perstudio also works as a Model Context Protocol server, so Claude Desktop and other MCP-compatible clients can use it natively. See the API reference for details on the MCP tool schema.