Use this file to discover all available pages before exploring further.
1
Generate your API key
Head to the Plato dashboard and copy your API key. Keep this secure - you’ll need it for all API requests.
Your API key provides access to your Plato environments. Never share it publicly or commit it to version control.
2
Install the SDK
Install the Plato SDK v2:
uv add plato-sdk-v2
Or with pip:
pip install plato-sdk-v2
3
Set up your environment variables
Set your API key in your environment:
export PLATO_API_KEY=your_api_key_here
The SDK will automatically use this environment variable.
4
Create your first session
Create a session with an environment and start interacting:
import asynciofrom plato.v2 import AsyncPlato, Envasync def main(): # Initialize the client plato = AsyncPlato() # Create a session with an espocrm environment session = await plato.sessions.create( envs=[Env.simulator("espocrm")] ) try: # Reset to initial state await session.reset() # Get the public URL to access the application urls = await session.get_public_url() print(f"Access your environment at: {urls}") # Execute a command result = await session.execute("whoami") print(f"Running as: {result}") # Get the current state state = await session.get_state() print(f"State: {state}") finally: # Always clean up await session.close() await plato.close()asyncio.run(main())
5
Explore the API
Now that you have a working environment, explore the full API: