API Documentation

Integrate Fate's decision engine into your applications

API Overview

The Fate API allows developers to integrate Fate's decision engine into their own applications. We provide both RESTful API and WebSocket API interfaces, supporting various programming languages and platforms.

Authentication

All API requests require authentication using an API key. You can generate and manage API keys in the developer console.

Rate Limits

Free accounts can send 10 requests per minute, up to 1,000 requests per day. Paid accounts have higher limits.

Data Format

All requests and responses use JSON format. Make sure to set the correct Content-Type header.

Quick Start

Below is an example code for using the Fate API for decision analysis.

cURL
curl -X POST https://api.fate.ai/v1/decisions/analyze \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
  "context": "Career Choice",
  "options": ["Continue Current Job", "Start a Business", "Further Education"],
  "factors": ["Income", "Growth", "Risk", "Work-Life Balance"]
}'

Response Example

{
  "id": "dec_12345",
  "created_at": "2023-06-15T08:30:45Z",
  "context": "Career Choice",
  "options": [
    {
      "id": "opt_1",
      "name": "Continue Current Job",
      "analysis": {
        "pros": ["Stable Income", "Familiar Environment", "Low Risk"],
        "cons": ["Limited Growth Space", "Possible Lack of Challenge"],
        "score": 0.75
      }
    },
    {
      "id": "opt_2",
      "name": "Start a Business",
      "analysis": {
        "pros": ["High Potential Return", "Autonomy", "Innovation Opportunity"],
        "cons": ["High Risk", "Unstable Income", "High Work Pressure"],
        "score": 0.65
      }
    },
    {
      "id": "opt_3",
      "name": "Further Education",
      "analysis": {
        "pros": ["Enhance Professional Skills", "Expand Network", "Long-term Career Development"],
        "cons": ["Short-term Income Reduction", "Large Time Investment"],
        "score": 0.82
      }
    }
  ],
  "recommendation": "opt_3",
  "confidence": 0.85
}

API Endpoints

Below is a list of the main endpoints for the Fate API.

GET /v1/decisions

Get the user's decision history records.

GETAuthentication Required

POST /v1/decisions/analyze

Analyze decision context, generate decision options and analysis reports.

POSTAuthentication Required

POST /v1/decisions/simulate

Simulate possible outcomes and impacts of decision options.

POSTAuthentication Required

GET /v1/map

Get global destiny map data.

GETAuthentication Required

© 2025 Fate AI. 保留所有权利。

返回首页