AI Magicx
API Endpoints

Models & Tools API

Models & Tools API

Get information about available AI models and tools based on your subscription plan.

List Models

Code
GET /api/v1/models

Returns a list of AI models available to your API key.

Response Format

Code(json)
{ "success": true, "data": { "models": [ { "id": "4o-mini", "name": "GPT-4 Omni Mini", "provider": "openai", "description": "Fast and efficient model for everyday tasks", "max_tokens": 4096, "supports_tools": true, "supports_vision": false, "tier": "basic" }, { "id": "claude-3-5-sonnet", "name": "Claude 3.5 Sonnet", "provider": "anthropic", "description": "Advanced reasoning and creative tasks", "max_tokens": 4096, "supports_tools": true, "supports_vision": true, "tier": "basic" } ] } }

Model Properties

PropertyTypeDescription
idstringModel identifier for API calls
namestringHuman-readable model name
providerstringModel provider (openai, anthropic, google)
descriptionstringModel capabilities description
max_tokensintegerMaximum supported tokens
supports_toolsbooleanTool/function calling support
supports_visionbooleanImage understanding capability
tierstringRequired plan tier

List Tools

Code
GET /api/v1/tools

Returns available tools that can be used with chat completions.

Response Format

Code(json)
{ "success": true, "data": { "tools": [ { "id": "getWeather", "name": "Get Weather", "category": "utility", "description": "Get current weather information for any location", "tier": "basic", "parameters": { "type": "object", "properties": { "location": { "type": "string", "description": "City or location name" } }, "required": ["location"] } }, { "id": "createPieChart", "name": "Create Pie Chart", "category": "visualization", "description": "Generate a pie chart visualization", "tier": "basic", "parameters": { "type": "object", "properties": { "data": { "type": "array", "description": "Chart data points" }, "title": { "type": "string", "description": "Chart title" } }, "required": ["data"] } } ] } }

Tool Properties

PropertyTypeDescription
idstringTool identifier for API calls
namestringHuman-readable tool name
categorystringTool category
descriptionstringWhat the tool does
tierstringRequired plan tier
parametersobjectJSON Schema for tool parameters

Tool Categories

  • visualization - Chart and graph generation
  • utility - General purpose tools
  • github - GitHub integration tools
  • mcp - Model Context Protocol tools

Available Models by Provider

OpenAI Models

  • 4o-mini - Fastest, most affordable
  • 4o - Balanced performance
  • gpt-4.1 - Advanced capabilities
  • gpt-4.1-mini - Smaller GPT-4
  • o3 - Reasoning-focused
  • o3-mini - Compact reasoning
  • o4-mini - Next generation

Anthropic Models

  • claude-3-5-sonnet - Creative and analytical
  • claude-3-7-sonnet - Enhanced Sonnet
  • claude-sonnet-4-20250514 - Latest Sonnet
  • claude-opus-4-20250514 - Most capable

Google Models

  • gemini-2.5-flash - Fast responses
  • gemini-2.5-pro - Advanced features

Model Selection Guide

For Simple Tasks

  • Use 4o-mini or gemini-2.5-flash
  • Lowest credit consumption
  • Fastest response times

For Complex Reasoning

  • Use claude-3-5-sonnet or gpt-4.1
  • Better understanding of context
  • More accurate responses

For Creative Tasks

  • Use claude-3-5-sonnet or 4o
  • Better creative writing
  • More varied outputs

For Code Generation

  • Use claude-3-5-sonnet or gpt-4.1
  • Better code quality
  • Understands complex requirements

Request Credit Consumption

All API calls consume request credits:

Chat Endpoint

  • Base chat message: 1 request credit
  • Each tool used: +1 request credit

Examples:

  • Simple chat: 1 credit
  • Chat with weather tool: 2 credits (1 base + 1 tool)
  • Chat with 3 tools: 4 credits (1 base + 3 tools)

Image Generation

  • 1 credit per image

Logo Generation

  • 1 credit per logo

Example Requests

List Models

Code(bash)
curl -X GET https://beta.aimagicx.com/api/v1/models \ -H "Authorization: Bearer mgx-sk-your-api-key"

List Tools

Code(bash)
curl -X GET https://beta.aimagicx.com/api/v1/tools \ -H "Authorization: Bearer mgx-sk-your-api-key"

Next Steps

Last modified on