API Documentation
Complete guide to integrating CryoPT.AI's AI investment advisors into your applications.
Table of Contents
Your API Key
Important: Keep your API key secure. Do not share it publicly, commit it to version control, or expose it in client-side code.
Authentication
All API requests must include your API key in the Authorization header using the Bearer token scheme.
Header Format
Authorization: Bearer YOUR_API_KEY
Authentication Example
curl -X POST https://cryopt.ai/v1/chat \
-H "Authorization: Bearer cptai_xxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"advisor": "cryo", "message": "What is a good ETF for beginners?"}'
const response = await fetch('https://cryopt.ai/v1/chat', { method: 'POST', headers: { 'Authorization': 'Bearer cptai_xxxxxxxxxxxx', 'Content-Type': 'application/json' }, body: JSON.stringify({ advisor: 'cryo', message: 'What is a good ETF for beginners?' }) });
import requests response = requests.post( 'https://cryopt.ai/v1/chat', headers={ 'Authorization': 'Bearer cptai_xxxxxxxxxxxx', 'Content-Type': 'application/json' }, json={ 'advisor': 'cryo', 'message': 'What is a good ETF for beginners?' } )
Base URL
All API endpoints are relative to the following base URL:
https://cryopt.ai/v1
API Version: The current API version is v1. We recommend always specifying the version in your requests to ensure compatibility.
Rate Limits
API rate limits depend on your subscription plan. Exceeding these limits will result in a 429 Too Many Requests error.
Rate Limit Headers
Each response includes headers to help you track your usage:
| Header | Description |
|---|---|
| X-RateLimit-Limit | Your monthly request limit |
| X-RateLimit-Remaining | Remaining requests this month |
| X-RateLimit-Reset | Unix timestamp when the limit resets |
AI Advisors Overview
CryoPT.AI provides seven distinct AI investment advisors powered by OpenAI GPT-4o and Google Gemini, each with unique investment philosophies and risk profiles. Choose the advisor that best matches your investment strategy.
CryoAI cryo
Free TierConservative investment advisor focused on capital preservation and long-term stability. Prioritizes low-volatility assets, strong fundamentals, and dividend-paying stocks.
Investment Style: Requires Debt-to-Equity < 0.5, positive free cash flow. Interprets RSI > 70 as "AVOID". Recommends max 5% allocation per position. Includes Market Maker & Smart Money perspective.
WarrenAI warren
Pro TierValue investing advisor inspired by Warren Buffett's principles. Focuses on finding undervalued companies with strong moats, consistent earnings, and excellent management.
Investment Style: Calculates intrinsic value using EPS and fair P/E. Looks for ROE > 15% and sustainable competitive advantages. Views RSI < 30 as potential opportunity. Includes Market Maker & Smart Money perspective.
BurryAI burry
Pro TierContrarian investor modeled after Michael Burry's approach. Specializes in forensic accounting analysis, identifying market inefficiencies, and finding asymmetric risk/reward opportunities.
Investment Style: Compares cash flow vs earnings to detect red flags. Looks for extreme fear (RSI < 20) as buying opportunity. Identifies potential short candidates and asymmetric bets. Includes Market Maker & Smart Money perspective.
CryoBit cryobit
Pro TierTechnical chart analysis specialist focusing on pattern recognition, momentum indicators, and price action. Expert in reading market trends through RSI, MACD, SMA, and Bollinger Bands.
Investment Style: Analyzes RSI divergences, MACD crossovers, Golden/Death Cross patterns. Uses Bollinger Bands for volatility assessment. Identifies support/resistance levels. Includes Market Maker & Smart Money perspective.
Cryo x Gemini gemini
Free TierGoogle Gemini-powered general-purpose AI assistant. Provides broad financial education, market explanations, and general investment guidance without specific recommendations.
Capabilities: Answers general financial questions, explains investment concepts, provides market overviews. Uses Google's Gemini model for broad knowledge. Includes Market Maker & Smart Money perspective.
SaNa (Satoshi Nakamoto AI) sana
Pro TierCrypto-only AI analyst channeling the spirit of Satoshi Nakamoto. Specializes exclusively in cryptocurrency, blockchain, DeFi, NFTs, and Web3. Features wallet analysis, on-chain metrics, whale tracking, and scam detection.
Specialization: Analyzes any EVM wallet (ETH, BSC, Polygon, Arbitrum, Base, Optimism, Avalanche) via Moralis API for balances, token holdings, transactions, and token transfers. Provides crypto price targets, DeFi protocol analysis, whale activity tracking, and scam detection. Does NOT analyze stocks or traditional finance.
Quant cptai-quant
CryoPT.AI TierThe ultimate premium advisor combining expertise from all other advisors into one supreme intelligence. Delivers institutional-grade analysis with 12 mandatory sections covering fundamental, technical, quantitative, and contrarian perspectives.
12 Mandatory Analysis Sections: (1) Fundamental Analysis with intrinsic value, (2) Technical Analysis with RSI/MACD/Bollinger, (3) Risk Management with position sizing, (4) Contrarian Analysis with sentiment extremes, (5) Quantitative Synthesis with probability-weighted scenarios, (6) Target Price Analysis (bull/base/bear), (7) News & Outsider Information, (8) Kalman Trend Filter (KEP, Velocity, Noise Ratio), (9) Elliott Wave Analysis (wave count, Fibonacci targets, invalidation), (10) Wall Street Analyst Consensus, (11) Technical Chart Insights, (12) Trade Management Playbook (entry/stop/T1/T2/T3). Market Maker & Smart Money perspective included.
API Endpoints
Send a message to an AI investment advisor and receive personalized investment guidance. This is the primary endpoint for interacting with the advisors.
Request Parameters
| Parameter | Type | Description |
|---|---|---|
| advisor required | string | The advisor ID to use. Valid values: "cryo" (Free), "warren" (Pro), "burry" (Pro), "cryobit" (Pro), "gemini" (Free), "sana" (Pro - crypto only), or "cptai-quant" (CryoPT.AI) |
| message required | string | Your investment question or query. Maximum 4,000 characters. |
| context optional | array | Previous conversation messages for context. Maximum 10 messages. See Conversation Context for format. |
| include_data optional | boolean | If true, includes real-time market data in the response when a stock/crypto is mentioned. Default: true |
Request Body Example
{
"advisor": "warren",
"message": "Should I invest in Apple stock at the current price?",
"context": [],
"include_data": true
}
Response Schema
| Field | Type | Description |
|---|---|---|
| success | boolean | Whether the request was successful |
| advisor | string | The advisor ID that processed the request |
| response | string | The advisor's investment guidance and analysis |
| stocks | array | Real-time market data for mentioned assets (if include_data is true) |
| usage | object | Current API usage statistics |
| timestamp | string | ISO 8601 timestamp of the response |
Response Example
{
"success": true,
"advisor": "warren",
"response": "Apple (AAPL) is a wonderful business at a fair price. Let me share my analysis...\n\n**Intrinsic Value Analysis:**\nWith current EPS of $6.42 and a fair P/E of 25x for a company with Apple's moat, I calculate intrinsic value around $160. At the current price of $188, you're paying a premium.\n\n**Competitive Moat:**\nApple has an exceptional ecosystem moat - once customers are in, they rarely leave. Brand loyalty, switching costs, and network effects create a sustainable competitive advantage.\n\n**My Recommendation:**\nWait for a better entry point around $165-170 (20-25% margin of safety). As I always say, 'Price is what you pay, value is what you get.'",
"stocks": [
{
"symbol": "AAPL",
"name": "Apple Inc.",
"price": 188.85,
"change": 2.35,
"changePercent": 1.26,
"exchange": "NASDAQ",
"pe": 29.4,
"eps": 6.42,
"high52Week": 199.62,
"low52Week": 164.08
}
],
"usage": {
"calls_used": 45,
"calls_remaining": 955,
"calls_limit": 1000
},
"timestamp": "2025-01-04T12:30:45.123Z"
}
Retrieve detailed information about all available AI advisors, including their investment philosophies, risk profiles, and specializations.
Response Example
{
"success": true,
"advisors": [
{
"id": "cryo",
"name": "CryoAI",
"tier": "free",
"risk_level": "low",
"description": "Conservative investment advisor focusing on capital preservation and long-term stability",
"specializations": ["Index Funds", "Bonds", "Blue-chip Stocks", "Dividend Investing", "Market Maker Perspective"]
},
{
"id": "warren",
"name": "WarrenAI",
"tier": "pro",
"risk_level": "medium",
"description": "Value investing advisor inspired by Warren Buffett's principles",
"specializations": ["Value Stocks", "Moat Analysis", "Long-term Holdings", "Market Maker Perspective"]
},
{
"id": "burry",
"name": "BurryAI",
"tier": "pro",
"risk_level": "high",
"description": "Contrarian investor modeled after Michael Burry, forensic accounting analysis",
"specializations": ["Deep Value", "Short Selling", "Distressed Assets", "Market Maker Perspective"]
},
{
"id": "cryobit",
"name": "CryoBit",
"tier": "pro",
"risk_level": "medium",
"description": "Technical chart analysis specialist with pattern recognition and momentum indicators",
"specializations": ["Technical Analysis", "Chart Patterns", "Momentum Trading", "Market Maker Perspective"]
},
{
"id": "gemini",
"name": "Cryo x Gemini",
"tier": "free",
"risk_level": "general",
"description": "Google Gemini-powered AI assistant for financial education and market insights",
"specializations": ["Financial Education", "Market Insights", "General AI", "Market Maker Perspective"]
},
{
"id": "sana",
"name": "SaNa (Satoshi Nakamoto AI)",
"tier": "pro",
"risk_level": "high",
"description": "Crypto-only analyst with wallet analysis, on-chain metrics, whale tracking, and scam detection",
"specializations": ["Cryptocurrency", "DeFi", "Wallet Analysis", "On-Chain Metrics", "Scam Detection"],
"supported_chains": ["Ethereum", "BSC", "Polygon", "Arbitrum", "Base", "Optimism", "Avalanche"]
},
{
"id": "cptai-quant",
"name": "Quant",
"tier": "cryoptai",
"risk_level": "institutional",
"description": "Ultimate premium advisor with 12 mandatory analysis sections including Kalman Trend Filter and Elliott Wave",
"specializations": ["Quantitative Analysis", "Kalman Trend Filter", "Elliott Wave", "Multi-Strategy", "Market Maker Perspective"],
"analysis_sections": 12
}
]
}
Check your current API usage statistics and remaining quota for the billing period.
Response Example
{
"success": true,
"plan": "personal",
"billing_period": {
"start": "2025-01-01T00:00:00Z",
"end": "2025-01-31T23:59:59Z"
},
"usage": {
"calls_used": 245,
"calls_limit": 1000,
"calls_remaining": 755,
"percentage_used": 24.5
},
"rate_limits": {
"requests_per_minute": 60,
"concurrent_requests": 10
}
}
CryoHub API
CryoHub is CryoPT.AI's floating AI assistant with chat, image generation, and video generation capabilities. Available on all platform pages.
Chat with CryoHub AI assistant. Supports text responses, AI-powered image generation using Stable Diffusion XL, and video generation using Wan 2.1 model.
Request Parameters
| Parameter | Type | Description |
|---|---|---|
| message required | string | User message. Include "generate image" or "create video" keywords to trigger media generation. |
| sessionId optional | string | Session ID for conversation continuity |
Response Example (Image Generation)
{
"response": "Here's your generated image of a sunset over mountains!",
"image": "https://replicate.delivery/pbxt/.../output.png",
"sessionId": "abc123-session-id"
}
Response Example (Video Generation)
{
"response": "Here's your generated video of ocean waves!",
"video": "https://replicate.delivery/pbxt/.../output.mp4",
"sessionId": "abc123-session-id"
}
Usage Limits (Daily Reset):
- Free Tier: 5 images/day, no video generation
- Pro Tier: Unlimited images, 5 videos/day
- CryoPT.AI Tier: Unlimited images and videos
Market Data API
Real-time and historical market data for stocks and cryptocurrencies from global exchanges. Supports 80+ cryptocurrency exchanges including Binance, Coinbase, Kraken, Bybit, and more.
Get real-time price data for a stock or cryptocurrency.
Response Example
{
"symbol": "AAPL",
"price": 188.85,
"change": 2.35,
"changePercent": 1.26,
"high": 190.12,
"low": 186.50,
"volume": 45230000
}
Get comprehensive stock data including fundamentals, earnings, and analyst recommendations.
Response Example
{
"symbol": "AAPL",
"name": "Apple Inc.",
"price": 188.85,
"pe": 29.4,
"eps": 6.42,
"marketCap": 2890000000000,
"dividendYield": 0.52,
"high52Week": 199.62,
"low52Week": 164.08,
"analystRating": "Buy"
}
Get technical indicators including RSI, MACD, SMA, and Bollinger Bands.
Response Example
{
"symbol": "AAPL",
"rsi": 55.4,
"macd": {
"value": 1.25,
"signal": 0.95,
"histogram": 0.30
},
"sma": {
"sma20": 185.50,
"sma50": 182.30,
"sma200": 175.80
},
"bollingerBands": {
"upper": 195.20,
"middle": 185.50,
"lower": 175.80
}
}
DYOR API (Do Your Own Research)
Comprehensive asset research tool with search, fundamentals, technical indicators, and AI advisor consensus panel. Supports global exchanges with proper currency display.
Search for stocks and cryptocurrencies with auto-complete suggestions.
Response Example
{
"results": [
{
"symbol": "AAPL",
"name": "Apple Inc.",
"exchange": "NASDAQ",
"type": "stock"
}
]
}
Get comprehensive research data for an asset including market snapshot, fundamentals, technical indicators, and analyst ratings.
Get AI Advisor Consensus Panel - sentiment analysis and targets from all three primary AI advisors (CryoAI, WarrenAI, BurryAI).
Request Body
{
"symbol": "AAPL",
"data": { /* asset data from /api/dyor/data */ }
}
SimuAI API (Pro+)
AI-powered portfolio strategy simulator. Define investment parameters, select asset types, and receive advisor-specific curated asset pools with real-time data analysis.
Plan Requirement: SimuAI is available for Pro and CryoPT.AI subscribers only.
Run a portfolio simulation with specified parameters and receive curated asset recommendations.
Request Parameters
| Parameter | Type | Description |
|---|---|---|
| amount required | number | Investment amount (minimum $100) |
| advisor optional | string | Advisor strategy: "cryo", "warren", or "burry". Default: "cryo" |
| stockCount optional | string | Number of assets: "1-5", "5-10", or "10-20". Default: "1-5" |
| assetTypes optional | array | Asset types to include: ["stocks", "crypto", "bonds"] |
Request Example
{
"amount": 10000,
"advisor": "warren",
"stockCount": "5-10",
"assetTypes": ["stocks", "crypto"]
}
Conversation Context
To maintain context across multiple messages, you can include previous conversation history in the context parameter. This allows the advisor to reference earlier parts of the conversation.
Context Message Format
Each message in the context array should have the following structure:
| Field | Type | Description |
|---|---|---|
| role | string | Either "user" for your messages or "assistant" for advisor responses |
| content | string | The message content |
Context Example
{
"advisor": "warren",
"message": "What about Microsoft instead?",
"context": [
{
"role": "user",
"content": "Should I invest in tech stocks?"
},
{
"role": "assistant",
"content": "Tech stocks can be excellent long-term investments if you focus on companies with durable competitive advantages..."
},
{
"role": "user",
"content": "What about Apple?"
},
{
"role": "assistant",
"content": "Apple is a wonderful business, but at current valuations, I'd wait for a better entry point..."
}
]
}
Context Limit: Maximum 10 messages in the context array. Older messages should be trimmed to stay within this limit.
Error Handling
The API uses standard HTTP status codes to indicate success or failure. All error responses include a JSON body with details about the error.
Error Response Format
{
"success": false,
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "You have exceeded your monthly API call limit",
"details": {
"limit": 1000,
"used": 1000,
"reset_at": "2025-02-01T00:00:00Z"
}
}
}
HTTP Status Codes
| Status | Error Code | Description |
|---|---|---|
| 200 | - | Success - Request processed successfully |
| 400 | BAD_REQUEST | Invalid request parameters or malformed JSON |
| 401 | UNAUTHORIZED | Missing or invalid API key |
| 403 | FORBIDDEN | API key is valid but lacks permission for this action |
| 404 | NOT_FOUND | Requested resource or endpoint not found |
| 422 | INVALID_ADVISOR | Invalid advisor ID specified |
| 429 | RATE_LIMIT_EXCEEDED | Too many requests or monthly quota exceeded |
| 500 | INTERNAL_ERROR | Internal server error - please try again later |
| 503 | SERVICE_UNAVAILABLE | Service temporarily unavailable for maintenance |
Best Practices
Security
- Never expose your API key in client-side code. Always make API calls from your backend server.
- Store your API key in environment variables, not in source code.
- Rotate your API key immediately if you suspect it has been compromised.
- Use HTTPS for all API requests (enforced automatically).
Performance
- Cache responses when appropriate to reduce API calls and improve response times.
- Implement exponential backoff for retries when encountering rate limits or server errors.
- Keep context arrays minimal - include only relevant conversation history.
- Use
include_data: falseif you don't need real-time market data.
Error Handling
- Always check the
successfield in responses before processing data. - Implement proper error handling for all HTTP status codes.
- Log errors with full context for debugging.
- Provide meaningful error messages to your end users.
Usage Optimization
- Monitor your usage via the
/v1/usageendpoint to avoid hitting limits. - Set up alerts when approaching your monthly quota (e.g., at 80% usage).
- Consider upgrading to Commercial API if you need higher limits.
Complete Code Examples
JavaScript / Node.js
// CryoPT.AI API Client - Node.js Example const CRYOPT_API_KEY = process.env.CRYOPT_API_KEY; const BASE_URL = 'https://cryopt.ai/v1'; class CryoPTClient { constructor(apiKey) { this.apiKey = apiKey; } async chat(advisor, message, context = []) { const response = await fetch(`${BASE_URL}/chat`, { method: 'POST', headers: { 'Authorization': `Bearer ${this.apiKey}`, 'Content-Type': 'application/json' }, body: JSON.stringify({ advisor, message, context }) }); if (!response.ok) { const error = await response.json(); throw new Error(error.error?.message || 'API request failed'); } return response.json(); } async getUsage() { const response = await fetch(`${BASE_URL}/usage`, { headers: { 'Authorization': `Bearer ${this.apiKey}` } }); return response.json(); } } // Usage Example const client = new CryoPTClient(CRYOPT_API_KEY); async function main() { try { // Ask CryoAI for conservative investment advice const response = await client.chat( 'cryo', 'What are the safest dividend ETFs for a retirement portfolio?' ); console.log('Advisor Response:', response.response); console.log('Remaining calls:', response.usage.calls_remaining); } catch (error) { console.error('Error:', error.message); } } main();
Python
# CryoPT.AI API Client - Python Example import os import requests from typing import List, Dict, Optional class CryoPTClient: BASE_URL = "https://cryopt.ai/v1" def __init__(self, api_key: str): self.api_key = api_key self.headers = { "Authorization": f"Bearer {api_key}", "Content-Type": "application/json" } def chat( self, advisor: str, message: str, context: Optional[List[Dict]] = None, include_data: bool = True ) -> Dict: """Send a message to an AI advisor.""" response = requests.post( f"{self.BASE_URL}/chat", headers=self.headers, json={ "advisor": advisor, "message": message, "context": context or [], "include_data": include_data } ) response.raise_for_status() return response.json() def get_advisors(self) -> Dict: """Get list of available advisors.""" response = requests.get( f"{self.BASE_URL}/advisors", headers=self.headers ) response.raise_for_status() return response.json() def get_usage(self) -> Dict: """Check current API usage.""" response = requests.get( f"{self.BASE_URL}/usage", headers=self.headers ) response.raise_for_status() return response.json() # Usage Example if __name__ == "__main__": api_key = os.environ.get("CRYOPT_API_KEY") client = CryoPTClient(api_key) # Get value investing advice from WarrenAI result = client.chat( advisor="warren", message="Should I buy Berkshire Hathaway stock?" ) print("Response:", result["response"]) print("Usage:", result["usage"])
cURL
# Chat with CryoAI (Conservative) curl -X POST https://cryopt.ai/v1/chat \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "advisor": "cryo", "message": "What is the safest way to invest $10,000?" }' # Chat with WarrenAI (Value Investing) curl -X POST https://cryopt.ai/v1/chat \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "advisor": "warren", "message": "Is Coca-Cola still a good long-term investment?" }' # Chat with BurryAI (Contrarian) curl -X POST https://cryopt.ai/v1/chat \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "advisor": "burry", "message": "What sectors look overvalued right now?" }' # Chat with SaNa (Crypto Only - Pro) curl -X POST https://cryopt.ai/v1/chat \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "advisor": "sana", "message": "Analyze Bitcoin whale activity and on-chain metrics" }' # SaNa Wallet Analysis (send an EVM wallet address) curl -X POST https://cryopt.ai/v1/chat \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "advisor": "sana", "message": "Analyze this wallet: 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045" }' # Chat with Quant (Institutional Grade - CryoPT.AI Tier) curl -X POST https://cryopt.ai/v1/chat \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "advisor": "cptai-quant", "message": "Full analysis of NVDA with Kalman Trend Filter and Elliott Wave" }' # Check your API usage curl https://cryopt.ai/v1/usage \ -H "Authorization: Bearer YOUR_API_KEY" # List available advisors curl https://cryopt.ai/v1/advisors \ -H "Authorization: Bearer YOUR_API_KEY"
Need Help? If you have questions or need assistance, contact us at cryoprincetechnologies@gmail.com