Apple-Intelligence-API  by gouwsxander

Local API for Apple Intelligence Foundation Models

Created 1 year ago
284 stars

Top 93.0% on SourcePulse

GitHubView on GitHub
Project Summary

This Swift-based web API exposes Apple's on-device Foundation Models through an OpenAI-compatible HTTP interface. Built with Vapor, it targets developers seeking to integrate Apple Intelligence capabilities into applications, offering a familiar API structure for streamlined adoption and leveraging powerful on-device AI without external dependencies.

How It Works

The project utilizes the Vapor web framework to create an HTTP server that interfaces with Apple's on-device Foundation Models. It translates standard API requests into calls to these local models, supporting both single-prompt completions and multi-turn chat conversations. Responses can be streamed in real-time using Server-Sent Events, mirroring the behavior of popular LLM APIs.

Quick Start & Requirements

  • Requirements: An Apple Intelligence-enabled device and Swift 6.0+.
  • Build: swift build
  • Run: swift run AppleIntelligenceApi serve [--port, -p] (defaults to http://localhost:8080).
  • Setup: Requires enabling Apple Intelligence in device settings.
  • Docs: Refers to OpenAI/OpenRouter documentation for API usage details.

Highlighted Details

  • OpenAI-compatible API: Works seamlessly with existing OpenAI/OpenRouter client libraries.
  • Supports chat completions (multi-turn) and non-chat completions (single-prompt).
  • Real-time streaming responses via Server-Sent Events.
  • Offers two model variants: base (default guardrails) and permissive (relaxed filtering).

Maintenance & Community

  • Tests: Currently lacks automated tests; contributions are welcomed.
  • Contributing: Standard pull request workflow is outlined.
  • Community: No specific community channels (e.g., Discord, Slack) are listed.

Licensing & Compatibility

  • License: Not explicitly stated in the README.
  • Compatibility: Designed for on-device execution on Apple Intelligence-enabled hardware. Local network deployment is supported.

Limitations & Caveats

Features such as Authentication and Tool/Function calling are not yet implemented. The project is an unofficial API wrapper and is not affiliated with Apple Inc. No automated tests are currently available.

Health Check
Last Commit

10 months ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
0 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.