Prerequisites
1
Get API Key
Generate an API key from the Artaios Agent Studio settings
2
Base URL
All API requests use:
https://api.artaios.ai/api/v13
Authentication
Include your API key in the
x-api-key header with every requestCreating Sessions
Learn the different ways to create and initialize a session with your agents.Option 1: Load Session from YAML Configuration
Create a session by providing a complete agent configuration in YAML format (as JSON):Option 2: Load Session from Existing Agent
Create a session from an agent already configured in Artaios Agent Studio. Use the agent’s unique key:Communicating with a Session
Once you have a session ID, you can execute messages and interact with your agent.Execute a Simple Message
Send a message to the agent and get a response:Continue Conversation
Send follow-up messages. The agent maintains context from previous messages:Pass Variables with Your Message
Inject variables into the agent’s context. Variables are substituted into agent prompts and maintain state across executions.Learn more in the Using Variables in REST API guide.
inputs field accepts a dictionary of variables that are available to your agents via {{ variables.key }}.
Multimodal Input: Images and Files
You can pass images and files to your agent for analysis. This feature is experimental — if you use it, please provide feedback on your experience.Send an Image with Your Message
AMAS officially supports three different methods for sending images to an agent.Method 1: The “Upload First” Method (Highly Recommended)
If you are building an interface where users upload local files, you should upload the image to the Artaios API first. This returns a temporary, secure URL that you then pass to the agent. This method reduces LLM token consumption by ~95% compared to Base64 encoding. Step 1: Upload the ImageMethod 2: Direct Public URL
If your image is already hosted publicly on the internet (e.g., a product image on your website), you can pass that URL directly. This is also highly efficient for token usage.Method 3: Direct Base64 String
You can encode the image directly into the JSON payload. This is easy for prototyping but incurs high token costs and inflates your request size significantly. It is not recommended for large files in production.Send a File for Processing
Pass files (PDFs, documents, etc.) to the agent:File upload via REST execute endpoint is not fully tested. Known limitations:
- File size limits may apply
- Some file types may not be supported
- Error handling may be incomplete
Error Handling
Common errors and how to handle them:Next Steps
Variables Guide
Master passing variables to your agents
API Reference
Complete endpoint documentation
YAML Configuration
Learn agent configuration syntax
Chatbot Integration
Build real-time chat interfaces