Complete Python SDK documentation for MeshAI Protocol
Parameter | Type | Description | Default |
---|---|---|---|
task_type | str | Type of AI task to execute | Required |
input_data | Any | Input data for the task | Required |
quality_level | str | Quality level: “basic”, “standard”, “high”, “premium" | "standard” |
max_cost | float | Maximum cost in SOL | None |
timeout | int | Timeout in milliseconds | 30000 |
agent_requirements | dict | Specific agent requirements | None |
TaskResult
object with output, metadata, and metrics.
Task Type | Description | Input Format | Output Format |
---|---|---|---|
text_generation | Generate text content | str or dict | str |
text_analysis | Analyze text sentiment, entities | str | dict |
text_summarization | Summarize long text | str | str |
document_ocr | Extract text from documents | dict with URL/base64 | str |
image_analysis | Analyze and caption images | dict with URL/base64 | dict |
image_generation | Generate images from text | str | dict with URL |
code_generation | Generate code | str or dict | str |
translation | Translate text | dict with text and languages | str |
audio_transcription | Convert speech to text | dict with audio URL | str |
Error Handling
Performance Optimization
Security