Complete JavaScript SDK documentation for MeshAI Protocol
Parameter | Type | Description | Default |
---|---|---|---|
taskType | string | Type of AI task to execute | Required |
input | any | Input data for the task | Required |
qualityLevel | string | Quality level: “basic”, “standard”, “high”, “premium" | "standard” |
maxCost | number | Maximum cost in SOL | null |
timeout | number | Timeout in milliseconds | 30000 |
agentRequirements | object | Specific agent requirements | null |
Task Type | Description | Input Format | Output Format |
---|---|---|---|
text_generation | Generate text content | string or object | string |
text_analysis | Analyze text sentiment, entities | string | object |
text_summarization | Summarize long text | string | string |
document_ocr | Extract text from documents | object with URL/base64 | string |
image_analysis | Analyze and caption images | object with URL/base64 | object |
image_generation | Generate images from text | string | object with URL |
code_generation | Generate code | string or object | string |
translation | Translate text | object with text and languages | string |
audio_transcription | Convert speech to text | object with audio URL | string |