Prerequisites
Before you begin, ensure you have:- Access to the LoopOS AI Server (production, staging, or development environment)
- An HTTP client (curl, Postman, or your preferred tool)
- Basic understanding of REST APIs and JSON
Base URL
LoopOS AI Server is deployed across multiple environments:Your First API Call
Let’s start with a simple example using the Decision service, which helps make choices based on context.Example: Decision Service
The Decision service picks the best choice from a list of options given a prompt and context.Expected Response
Common Request Fields
Most LoopOS AI services share common input fields:| Field | Type | Description | Default |
|---|---|---|---|
language | string | Language code (e.g., “PT-PT”, “en-US”) | “PT-PT” |
conversation | boolean | Whether this is part of a conversation thread | false |
callback_url | string | Optional callback URL for async responses | null |
loopos_core_context | string | Business context for the AI agent | null |
messages | array | List of conversation messages | [] |
images | array | Image URLs or base64 data URLs | [] |
agent_specific | object | Service-specific parameters | null |
session_extra_data | object | Additional session metadata |
Example: Chat with Submission Agent
The Submission service provides a conversational interface for product submission:Example: C2C Descriptor with Images
Generate a marketplace listing from images and context:Error Handling
LoopOS AI services return standard HTTP status codes:- 200 OK: Request successful
- 422 Validation Error: Invalid input parameters
- 413 Payload Too Large: Request exceeds size limits
- 429 Too Many Requests: Rate limit exceeded
- 500 Internal Server Error: Server-side error
Next Steps
1
Explore Services
Check out the Services documentation to see all available capabilities.
2
Read API Reference
Visit the API Reference for detailed endpoint documentation.
3
Learn Integration Patterns
See the AI Hub for integration guides and best practices.
4
Understand Architecture
Read about the Architecture to understand how services work internally.