⚙️ Developer

API Documentation

Everything you need to integrate AICraft's AI tools into your applications. Simple, RESTful, and powerful.

Introduction

The AICraft API is a RESTful interface that allows you to integrate AI automation capabilities directly into your applications. All responses are returned in JSON format.

The API provides access to text generation, data analysis, conversational AI, and the full AICraft tools marketplace. Whether you're building an internal tool or a customer-facing product, the API makes integration seamless.

Authentication

All API requests require authentication via an API key. Include your key in the Authorization header:

Authorization: Bearer YOUR_API_KEY

You can generate and manage API keys from your dashboard → API Keys. Keep your API key secure and never expose it in client-side code.

curl -X GET https://api.aicraft.co.in/v1/tools \
  -H "Authorization: Bearer ac_live_xxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json"

Base URL

All API endpoints are relative to the following base URL:

https://api.aicraft.co.in/v1

Rate Limits

API rate limits are applied per API key based on your plan:

PlanRequests / MinuteRequests / Month
Basic (Free)10100
Pro6010,000
EnterpriseUnlimitedUnlimited

Rate limit headers are included in every response: X-RateLimit-Remaining and X-RateLimit-Reset.

POST /generate-text

Generate high-quality AI text content for any purpose — emails, reports, product descriptions, summaries, and more.

POST /v1/generate-text

Request Body

{
  "prompt": "Write a professional email introducing our AI product to potential clients",
  "model": "aicraft-pro-v2",
  "max_tokens": 500,
  "temperature": 0.7,
  "sector": "Marketing"
}

Response

{
  "success": true,
  "id": "gen_01H9XK2M3P",
  "model": "aicraft-pro-v2",
  "text": "Dear [Name],\n\nI hope this message finds you well...",
  "tokens_used": 142,
  "finish_reason": "stop"
}

POST /analyze-data

Submit structured data and receive intelligent analysis, trend detection, anomaly identification, and actionable insights.

POST /v1/analyze-data

Request Body

{
  "data": [
    { "month": "Jan", "revenue": 120000 },
    { "month": "Feb", "revenue": 138000 },
    { "month": "Mar", "revenue": 95000 }
  ],
  "analysis_type": "trend",
  "sector": "Finance"
}

Response

{
  "success": true,
  "insights": {
    "trend": "downward in March (-31%)",
    "anomaly": "March revenue significantly below baseline",
    "recommendation": "Investigate Q1 close factors in March"
  },
  "confidence": 0.91
}

POST /chatbot

Create context-aware conversational experiences with persistent message history and domain-specific AI personas.

POST /v1/chatbot

Request Body

{
  "session_id": "sess_abc123",
  "message": "What are the best AI tools for healthcare?",
  "system_prompt": "You are an expert AI consultant for the healthcare sector.",
  "history": []
}

Response

{
  "success": true,
  "session_id": "sess_abc123",
  "reply": "For healthcare, the top AI tools include diagnostic imaging AI, clinical NLP for notes...",
  "tokens_used": 89
}

GET /tools

Retrieve all available AI tools in the AICraft marketplace with optional filtering.

GET /v1/tools?sector=Healthcare&limit=10

GET /sectors

List all industry sectors supported by the AICraft platform.

GET /v1/sectors

Error Handling

The API uses standard HTTP status codes. All errors include a JSON body with a machine-readable code and human-readable message.

StatusCodeDescription
400bad_requestMissing or invalid parameters
401unauthorizedInvalid or missing API key
403forbiddenFeature not available on your plan
429rate_limitedToo many requests — slow down
500server_errorInternal error — try again shortly
{
  "success": false,
  "error": {
    "code": "rate_limited",
    "message": "You have exceeded your monthly request limit.",
    "docs": "https://docs.aicraft.co.in/errors"
  }
}

AI Models

AICraft offers multiple model tiers optimized for different use cases:

SDKs & Libraries

Official client libraries are available for popular languages:

# Python
pip install aicraft-sdk

# Node.js
npm install @aicraft/sdk

# Go
go get github.com/aicraft/go-sdk