syntax = "proto3"; package appleintelligence; // Image data for vision requests message ImageData { bytes data = 1; string filename = 2; string mime_type = 3; } // Vision analysis results message ImageAnalysis { string text_content = 1; repeated string labels = 2; string description = 3; } // Completion request message CompletionRequest { string prompt = 1; optional float temperature = 2; optional int32 max_tokens = 3; repeated ImageData images = 4; bool include_analysis = 5; } // Completion response (non-streaming) message CompletionResponse { string id = 1; string text = 2; string finish_reason = 3; repeated ImageAnalysis image_analyses = 4; } // Streaming completion chunk message CompletionChunk { string id = 1; string delta = 2; bool is_final = 3; string finish_reason = 4; repeated ImageAnalysis image_analyses = 5; } // Health check request message HealthRequest {} // Health check response message HealthResponse { bool healthy = 1; string model_status = 2; } // Apple Intelligence Service service AppleIntelligenceService { // Single completion request rpc Complete(CompletionRequest) returns (CompletionResponse); // Streaming completion request rpc StreamComplete(CompletionRequest) returns (stream CompletionChunk); // Health check rpc Health(HealthRequest) returns (HealthResponse); }