AI ProxyExecute AI action
AI Proxy

Execute AI action

Execute a predefined AI action (e.g., summarize data, generate report, suggest insights). Actions are higher-level operations that combine AI capabilities with platform data.

curl -X POST "https://api.mythic-analytics.com/api/v1/ai/action" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -d '{
  "action": "summarize_data",
  "client_id": "acme-retail",
  "params": {
    "period": "30d",
    "metrics": [
      "page_views",
      "unique_visitors"
    ]
  }
}'
{
  "success": true,
  "data": {
    "action": "summarize_data",
    "result": {},
    "usage": {
      "prompt_tokens": 42,
      "completion_tokens": 42,
      "total_tokens": 42
    }
  }
}
POST
/ai/action
POST
Security Scheme
Bearer Tokenstring
Required

Admin API key as bearer token. Format: Bearer YOUR_ADMIN_KEY

Admin API key as bearer token. Format: Bearer YOUR_ADMIN_KEY
Content-Typestring
Required

The media type of the request body

Options: application/json
actionstring
Required

Action identifier (e.g., summarize_data, generate_report, suggest_insights).

client_idstring

Client ID to scope the action.

paramsobject

Action-specific parameters.

Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

Bearer token. Admin API key as bearer token. Format: Bearer YOUR_ADMIN_KEY

Body

application/json
actionstring
Required

Action identifier (e.g., summarize_data, generate_report, suggest_insights).

client_idstring

Client ID to scope the action.

paramsobject

Action-specific parameters.

Responses

successboolean
dataobject