API Reference

Complete reference for the AICCY SDK. All methods, parameters, and return values documented.

Core Methods

METHOD

AICCY.chat(message, options?)

Send a message to AICCY and receive a response based on the knowledge base.

Parameters

message : string — The user's query or message
options? : ChatOptions — Optional configuration

Returns

Promise<ChatResponse> — AICCY's response with metadata

Example

const response = await AICCY.chat('What is Jito?')
console.log(response.content)
// "◈ JITO - MEV INFRASTRUCTURE ◈..."
METHOD

AICCY.getKnowledge(topic)

Retrieve specific knowledge without natural language processing.

Parameters

topic : KnowledgeTopic — Topic identifier

Example

const solanaInfo = await AICCY.getKnowledge('solana')
const securityTips = await AICCY.getKnowledge('phishing')
METHOD

AICCY.validateAddress(address)

Validate a Solana wallet address and check for known risks.

Example

const validation = await AICCY.validateAddress('7xKXt...AbC')
if (validation.isValid && !validation.isScam) {
  console.log('Address is safe')
}

TypeScript Types

ChatOptions

interface ChatOptions {
  temperature?: number      // 0-1, default: 0.7
  maxTokens?: number        // Max response length, default: 500
  knowledge?: string[]      // Filter knowledge domains
  includeMetadata?: boolean // Include response metadata
}

ChatResponse

interface ChatResponse {
  content: string           // AICCY's response
  confidence: number        // Confidence score (0-1)
  topics: string[]          // Detected topics
  timestamp: Date           // Response timestamp
  metadata?: {
    tokens: number
    latency: number
    sources: string[]
  }
}

KnowledgeTopic

type KnowledgeTopic =
  | 'solana' | 'svm' | 'jito' | 'jupiter'
  | 'web3' | 'blockchain' | 'wallet'
  | 'security' | 'phishing' | 'privatekey'
  | 'bugs' | 'coffee' | 'stackoverflow' | 'coding'
  | 'gaming' | 'anime' | 'gacha'
  | 'meme' | 'wojak'

Error Handling

All AICCY methods can throw errors. Always wrap calls in try-catch blocks:

try {
  const response = await AICCY.chat('gm')
  console.log(response.content)
} catch (error) {
  if (error instanceof AICCYError) {
    console.error('AICCY Error:', error.code, error.message)
  }
}
RATE_LIMIT_EXCEEDED

Too many requests. Wait before retrying.

INVALID_API_KEY

API key is missing or invalid.

NETWORK_ERROR

Failed to connect to AICCY servers.

INVALID_PARAMETERS

Invalid method parameters provided.

Rate Limits

100
Requests per minute
10,000
Requests per day
1,000
Max tokens per request

Rate limits apply per API key. Contact support for higher limits.