Repository navigation
Getting Started
This guide walks you from zero to your first agent chat against the XRCopilot public API — first with a raw REST call, then with each of the three official SDKs.
For the full HTTP contract see REST-API-Reference; for the SDK surface see SDK-Overview.
To call the API you need:
-
A tenant (company) on the XRCopilot platform, identified by your
companyId. - A subscription key — the API key used to authenticate every request.
-
At least one configured, active agent inside a topic, so you have a
topicId,agentId, andendpointIdto chat with. Agents are created and activated from the platform UI (see the Administrator-Guide and User-Manuals).
If you do not yet have a subscription key, contact your Hevolus account manager or platform administrator.
All API requests require authentication using a subscription key passed in the request header.
Header:
Ocp-Apim-Subscription-Key: <YOUR_API_KEY>
Every request must include this header. Requests without a valid key are rejected.
All endpoints are served under the production base URL:
https://apim-hipexr-prod-italynorth.azure-api.net/api/lab-public/
Every request must also include the API version as a query parameter:
| Environment | Version Parameter |
|---|---|
| Production | api-version=2025-05-01 |
The basic chat call is synchronous: POST /agents/{companyId}/{topicId}/{agentId}/{endpointId}/chat runs the agent and returns the assistant's reply directly in the HTTP response body. Because the agent may invoke skills, search, or deep reasoning, a single call can take many seconds to complete.
Long-running conversations. If you would rather not hold the connection open, use the asynchronous variant (
StartChatAsync/start_chat/startChatAsync, which posts to.../chat-async). It returns immediately with a202 Acceptedand aconversationIdyou poll for the result; see SDK-Overview.
Send a message to an agent with POST /agents/{companyId}/{topicId}/{agentId}/{endpointId}/chat:
curl -X POST "https://apim-hipexr-prod-italynorth.azure-api.net/api/lab-public/agents/company-id/topic-id/agent-id/endpoint-id/chat?api-version=2025-05-01" \
-H "Ocp-Apim-Subscription-Key: <YOUR_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"companyId": "company-id",
"topicId": "topic-id",
"agentId": "agent-id",
"endpointId": "endpoint-id",
"message": "What products do you offer for enterprise customers?",
"conversationId": "<YOUR_CONVERSATION_ID>",
"answerLanguage": "en"
}'Reuse the same conversationId on subsequent requests to continue the conversation. For the full request/response schema, error codes, and the conversation-history endpoint used to retrieve replies, see REST-API-Reference.
Install the SDK for your platform (see SDK-Overview for full installation details), then run the minimal snippet below. As noted in section 4, ChatAsync / chat / chatAsync is synchronous — it sends the message and returns the assistant's reply in the response (which can take many seconds). For long-running conversations you can use the asynchronous variant (StartChatAsync / start_chat / startChatAsync), which returns immediately and lets you poll the conversation history for the result; see SDK-Overview.
dotnet add package Hevolus.XRCopilotLab.Client.Publicusing XRCopilotLab.Client;
var client = new AppClient("<YOUR_API_KEY>");
var prompt = new UserPrompt
{
CompanyId = "company-id",
TopicId = "topic-id",
AgentId = "agent-id",
EndpointId = "endpoint-id",
Message = "Hello, how can you help me?"
};
var response = await client.Agents.ChatAsync(prompt);
Console.WriteLine(response.Message);npm install xrcopilotlab.client.public.jsconst XRCopilotLabClient = require('xrcopilotlab.client.public.js');
const client = new XRCopilotLabClient("<YOUR_API_KEY>");
const prompt = {
CompanyId: "company-id",
TopicId: "topic-id",
AgentId: "agent-id",
EndpointId: "endpoint-id",
Message: "Hello, how can you help me?"
};
const response = await client.chatAsync(prompt);
console.log(response.Message);pip install hevolus-xrcopilotlabimport asyncio
from xrcopilotlab import XRCopilotLabClient
from xrcopilotlab.models import UserPrompt
async def main():
async with XRCopilotLabClient(api_key="<YOUR_API_KEY>") as client:
prompt = UserPrompt(
company_id="company-id",
topic_id="topic-id",
agent_id="agent-id",
endpoint_id="endpoint-id",
message="Hello, how can you help me?",
)
response = await client.agents.chat(prompt)
print(response.message)
asyncio.run(main())- REST-API-Reference — the complete public REST API: topics, profiles, agents, chat, orchestrators, and common services.
- SDK-Overview — services reference, data models, and error handling across the three SDKs.
- SDK-Examples-DotNet · SDK-Examples-JavaScript · SDK-Examples-Python — runnable, end-to-end examples per language.
© Hevolus Innovation · XRCopilot · Maintained by the XRCopilot team.
Getting Started
API
SDKs
Webhooks & Integrations
- Agent Task Webhooks
- Connections & Action Steps
- Integration Templates
- Authenticated Embed
- Microsoft Agent 365
- Microsoft Teams Notifications
No-code Builders
Orchestrators
Processes
Administration
Reference