Xalora AI Docs
  • Getting Started
    • Welcome to Xalora
  • Agent Framework
    • Social Agents
  • Xalora Mesh
  • Ecosystem
    • Xalora Imagine
  • imaginaries NFT
  • Developer Reference
    • Integration Overview
  • Supported Models
  • Understanding Image Prompting
  • Using Xalora API with Eliza
  • REST API
    • Xalora Mesh API
  • Synchronous Request
  • Image Generation API
  • Xalora SDK
    • Introduction
  • Getting Started
  • Basic Image Generation
  • SmartGen
  • ComfyUI Workflow
  • FluxLora Workflow
  • Text2Video Workflow
  • LLM Gateway
    • Introduction
  • LLM Tool Calling
  • Embeddings
Powered by GitBook
On this page
  • ​Quick Start
  • ​Endpoints
  • ​Available Agents
  • ​Use Cases
  • ​Client Libraries
  • ​Reference
  1. REST API

Xalora Mesh API

PreviousUsing Xalora API with ElizaNextSynchronous Request

Last updated 7 days ago

The Xalora Mesh REST API enables interaction with AI agents and tools through HTTP endpoints. Supports both synchronous and asynchronous operations.

This API is part of the . Contributions are highly encouraged!

Quick Start

Copy

// Example: Get token info synchronously
const response = await fetch("https://sequencer-v2.xalora.xyz/mesh_request", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    api_key: "YOUR_API_KEY",
    agent_id: "CoinGeckoTokenInfoAgent",
    input: {
      tool: "get_token_info",
      tool_arguments: { coingecko_id: "solana" },
      raw_data_only: true
    }
  })
});

Endpoints

POST /mesh_request

Make a request with immediate response.

Copy

{
  "api_key": "your_api_key_here",
  "agent_id": "agent_identifier",
  "input": {
    // Use either query OR tool+tool_arguments
    "query": "natural language query",
    // OR
    "tool": "tool_name",
    "tool_arguments": { /* tool-specific args */ },
    "raw_data_only": false  // optional, defaults to false
  }
}

// Response
{
  "result": { /* agent-specific response data */ }
}

POST /mesh_task_create

Create a task and receive a task ID.

Copy

{
  "api_key": "your_api_key_here",
  "agent_id": "agent_identifier",
  "agent_type": "AGENT",  // optional
  "task_details": {
    // Use either query OR tool+tool_arguments
    "query": "natural language query",
    // OR
    "tool": "tool_name",
    "tool_arguments": { /* tool-specific args */ },
    "raw_data_only": false  // optional, defaults to false
  }
}

// Response
{
  "task_id": "unique_task_identifier",
  "msg": "status_message"
}

POST /mesh_task_query

Check status and get results of an async task.

Copy

{
  "api_key": "your_api_key_here",
  "task_id": "task_identifier"
}

// Response
{
  "status": "task_status",
  "reasoning_steps": [  // present when available
    {
      "timestamp": 1234567890,
      "content": "step description",
      "is_sent": true
    }
  ],
  "result": {  // present when task is complete
    "response": "agent response data",
    "success": true  // or false
  }
}

To discover all available agents, their capabilities, and required parameters, use the metadata endpoint:

Copy

// Fetch agent metadata
const metadata = await fetch("https://mesh.xalora.ai/metadata.json")
  .then(response => response.json());

// Example: Get tools for a specific agent
const agentTools = metadata.agents["CoinGeckoTokenInfoAgent"].tools;

Copy

// Synchronous
const response = await fetch("https://sequencer-v2.xalora.xyz/mesh_request", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    api_key: "YOUR_API_KEY",
    agent_id: "CoinGeckoTokenInfoAgent",
    input: {
      query: "What is the current price of Bitcoin?",
      raw_data_only: false
    }
  })
});

// Asynchronous
const taskResponse = await fetch("https://sequencer-v2.xalora.xyz/mesh_task_create", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    api_key: "YOUR_API_KEY",
    agent_id: "CoinGeckoTokenInfoAgent",
    task_details: {
      query: "What is the current price of Bitcoin?",
      raw_data_only: false
    }
  })
});
const { task_id } = await taskResponse.json();

Copy

// Raw data (synchronous)
const response = await fetch("https://sequencer-v2.xalora.xyz/mesh_request", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    api_key: "YOUR_API_KEY",
    agent_id: "CoinGeckoTokenInfoAgent",
    input: {
      tool: "get_token_info",
      tool_arguments: { coingecko_id: "solana" },
      raw_data_only: true
    }
  })
});
  • Python: Xalora Mesh Xalora Client

https://sequencer-v2.xalora.xyz

All requests require an API key in the request payload at the root level.

Task Result

Copy

{
  "response": "any",  // varies by agent
  "success": true     // boolean
}

Reasoning Step

Copy

{
  "timestamp": 1234567890,  // Unix timestamp
  "content": "string",      // step description
  "is_sent": true           // boolean
}

Synchronous Request

Create Asynchronous Task

Query Task Status

Available Agents

The Mesh API provides access to a growing collection of specialized agents. For a complete and up-to-date list, see the section in the main repository README.

Agent Metadata

Use Cases

Natural Language Query

Tool Execution

Client Libraries

Coming soon: Official integration in the

Reference

Base URL

Authentication

Response Models

open source Xalora Agent Framework
​
​
​
​
​
​
Available Mesh Agents
​
​
​
​
​
Xalora SDK
​
​
​
​