← All guides AI Release
RU Subscribe to @ai_releaseorg

On-Device vs Cloud AI on iPhone: How to Set Up Hybrid LLM Routing

Updated: 15.10.2026 · AI Release · @ai_releaseorg
On-Device vs Cloud AI on iPhone: How to Set Up Hybrid LLM Routing

This guide shows you how to set up hybrid AI routing on an iPhone: short or private prompts stay on a local model, while heavy or complex requests go to a cloud API. It is for iPhone users who already have a local AI app and a cloud provider account, and who want to avoid sending every request to the cloud. The steps use Apple Shortcuts, a built-in automation app, so you do not need to write a full iOS app. If you only want to test local models first, read How to run AI models locally on your PC: a beginner's guide. For Android, see How to Run an AI Model Locally on Android: Apps and Setup.

Requirements and preparation

- [ ] Shortcuts app opens.

- [ ] Local app responds in Safari at your local URL.

- [ ] Cloud API key works in a desktop test (curl or provider console).

- [ ] You know the exact JSON field names your providers expect.

Step-by-step instructions

1. Open Shortcuts and create a new shortcut. Tap +, then name it "Hybrid AI Router". Expected result: an empty shortcut canvas. Shortcuts is Apple's automation app; it chains actions together.

2. Add a "Text" action. Type a sample prompt, for example: "Summarize this note in three bullets: The meeting moved to Friday." Expected result: the Text action holds your prompt. You will replace this with Shortcut Input later if you use Siri or the Share Sheet.

3. Add an "If" action to check the prompt. First add "Get Length of Text" and set its input to the Text action. Then add "If" > "Length" > "is less than" > 200. Expected result: the shortcut has two branches: short prompts and long prompts. Why: short prompts are usually cheap and fast enough for a local model.

Example:If the prompt is "What is 2+2?", the length is 8, so the local branch runs. If the prompt is a 500-word essay request, the cloud branch runs.

4. Build the local branch. Inside the "If" branch, add "Get Contents of URL". Set URL to your local endpoint, for example `http://127.0.0.1:8080/v1/chat/completions`. Set Method to POST. Add header `Content-Type: application/json`. Expected result: Shortcuts will send an HTTP POST request to your local app. Why: most local runtimes speak the same OpenAI-compatible chat format.

Use this JSON body as a template:

{
  "model": "your-local-model",
  "messages": [
    {"role": "user", "content": "What is 2+2?"}
  ],
  "temperature": 0.7
}

Replace "your-local-model" with the model name your app reports. If your app does not require a model name, remove that line. Expected result: the local app returns a JSON response.

5. Build the cloud branch. In the "Otherwise" branch, add another "Get Contents of URL". Set URL to your cloud endpoint, for example `https://api.example.com/v1/chat

🤖 AI summary

AI Release Knowledge Layer
Machine-readable description · Version 1.0

Status: practical guide. Some statements come from vendors; verify in your environment.

1. Summary

Inside: direct answers, key facts, entities, context, reliability, unknowns and sources.

Machine data: Citation Map JSON · JSON-LD · Semantic Embeddings — separate stage.

Full Knowledge Layer: sections 2–8

2. Direct answers

What is required?
iPhone with iOS 17 or later. Shortcuts comes preinstalled. Check Settings > General > About > Software Version.; A local AI app that runs a model on your iPhone or exposes a local HTTP endpoint. "Local HTTP endpoint" means a URL on your phone that accepts requests, like `http://127.0.0.1:8080/v1/chat/completions`. The… → details (AR-GUIDE-LOKALNAYAM-003)
Which topics does it cover?
локальная модель на iPhone, on-device AI iPhone, HybridRouter iOS, Apple Intelligence или ChatGPT, гибридный роутинг LLM → details (AR-GUIDE-LOKALNAYAM-002)

3. Key facts

  1. iPhone with iOS 17 or later. Shortcuts comes preinstalled. Check Settings > General > About > Software Version. — evidence; status: заявление источника.
  2. A local AI app that runs a model on your iPhone or exposes a local HTTP endpoint. "Local HTTP endpoint" means a URL on your phone that accepts requests, like `http://127.0.0.1:8080/v1/chat/completions`. The exact port depends on your app. — evidence; status: заявление источника.
  3. A cloud AI provider account and API key. API key is a secret string, often starting with `sk-`, that identifies your account. — evidence; status: заявление источника.

4. Entities

EntityTypeRole
локальная модель на iPhoneтема/инструментупоминается в заголовке, TL;DR или разделах гайда
on-device AI iPhoneтема/инструментупоминается в заголовке, TL;DR или разделах гайда
HybridRouter iOSтема/инструментупоминается в заголовке, TL;DR или разделах гайда
Apple Intelligence или ChatGPTтема/инструментупоминается в заголовке, TL;DR или разделах гайда
гибридный роутинг LLMтема/инструментупоминается в заголовке, TL;DR или разделах гайда
iOSплатформа/технологияупоминается в заголовке, TL;DR или разделах гайда
Appleкомпанияупоминается в заголовке, TL;DR или разделах гайда

5. Context

  • Guide — describes → On-Device vs Cloud AI on iPhone: How to Set Up Hybrid LLM Routing (AR-GUIDE-LOKALNAYAM-001).

6. Reliability

Confirmed

No independent confirmation is provided; source claims and editorial conclusions are separated below.

Source claims

  • Product features, versions, prices and limits come from vendors and the guide.
  • Commands and steps are recommendations, not guaranteed results.

AI Release analysis

  • Structure, comparison and selection criteria are editorial.
  • The guide does not replace an independent audit or legal advice.

7. Unknowns

  • Current versions, prices and limits.
  • Independent benchmarks and quality checks.
  • Terms of use and data policy.

8. Sources

SourceTypeRole
api.example.comвнешний источникссылка из тела гайда

Cite as: AI Release. Локальная модель или облако на iPhone: как настроить гибридный роутинг ИИ-запросов. ai-release.org.