ART OF X
DOCS
API

API Overview

Welcome to the Art of X API documentation. Our API allows you to programmatically create and manage AI sparks, upload knowledge, and interact with them.

Getting Started

The Art of X API is organized around REST principles. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL

Production: https://art-of-x.com/api/v1

Local Development: http://localhost:3000/api/v1

Authentication

All API endpoints require authentication via API key. You can generate and manage your API keys in your Account Settings.

Include your API key in the Authorization header:

Authorization: Bearer aox_your_api_key_here

Content Type

All requests that send data should include the Content-Type header:

Content-Type: application/json

For file uploads, use:

Content-Type: multipart/form-data

Available Endpoints

Sparks

Create AI sparks (agents) with custom configurations.

  • POST /api/v1/sparks - Create a new spark

Knowledge

Upload knowledge for your sparks.

  • POST /api/v1/sparks/{sparkId}/knowledge - Upload knowledge (links or files)

Chat

Interact with your sparks via chat completions.

  • POST /api/v1/sparks/{sparkId}/completion - Send messages and get responses

API Keys

Manage your API keys for authentication.

  • GET /api/v1/api-keys - List your API keys
  • POST /api/v1/api-keys - Create a new API key
  • DELETE /api/v1/api-keys/{keyId} - Delete an API key

Quick Example

Here's a quick example of creating a spark and chatting with it:

# 1. Create a spark
curl -X POST "https://art-of-x.com/api/v1/sparks" \
  -H "Authorization: Bearer aox_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Marketing Expert",
    "description": "Expert in digital marketing strategies",
    "type": "expert",
    "discipline": "Marketing"
  }'

# Response: { "data": { "id": "spark-id", ... } }

# 2. Chat with the spark
curl -X POST "https://art-of-x.com/api/v1/sparks/spark-id/completion" \
  -H "Authorization: Bearer aox_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "messages": [
      {
        "role": "user",
        "content": "What are the top social media trends for 2025?"
      }
    ]
  }'

Next Steps

Plan Limits

API usage is subject to your subscription plan:

PlanSparksFlowsMessages/Flow
Free10 (locked)100
Lite33500
PremiumUnlimitedUnlimitedUnlimited
AcademicUnlimitedUnlimitedUnlimited
TeamUnlimitedUnlimitedUnlimited

View Plans

Need Help?

If you have questions or need support with the API:

  • Check our FAQ
  • Contact us through the feedback form
  • Join our community discussions