LLM
Managed LLM text generation and project knowledge for your app.
Use LLM when your app needs to generate, rewrite, summarize, translate, classify, or extract text, or provide chat-like replies. Orchard currently runs every request with GPT-5.6 Luna.
When an app needs answers based on its own PDFs, documents, or other project files, your agent can turn on Knowledge. Orchard prepares those files for search, finds the relevant parts for each question, and returns an answer with source filenames. Builders do not need to choose an embedding model, split documents, or configure a separate search database.
No OpenAI account, model setup, or separate API key. Your agent
enables LLM, adds the right runtime call, and Orchard tracks usage
and billing in one place. Apps with a backend use a server-side
project key. Orchard Deploy sites can instead use the keyless,
same-origin /_orchard/llm path.
When to use LLM
Use LLM whenever your app needs to understand or produce natural language:
- Generate replies, descriptions, or draft content
- Rewrite text in a different tone or format
- Summarize long user-provided text
- Translate text between languages
- Classify messages or extract structured details from text
- Add a chat-like assistant to an app workflow
- Answer questions from product guides, policies, manuals, or other project documents
Use your project's files as Knowledge
Knowledge is optional and stays inside Orchard LLM. It is not a separate service. Each project gets an isolated document index, so one project's sources are never searched for another project.
- Upload the source files with Orchard Storage.
- Your agent calls
enable_knowledge. - Your agent links exact Storage filenames with
add_knowledge_files. - Wait until
get_knowledge_statusreports the files as ready. - Send
use_knowledge: truewith the normal LLM request.
Each linked file can be up to 4 MB. Common supported sources include
PDF, text, Markdown, HTML, CSV, JSON, office documents, spreadsheets,
and several code formats. A source can be removed with
remove_knowledge_files. Deleting the original file from
Orchard Storage also removes its linked Knowledge copy.
Text input and output
Your app sends a required text input and may add instructions for behavior, tone, language, or output format. Orchard returns generated text plus the model name and token usage. Multilingual text is supported, so input and output can be Korean, English, Japanese, Spanish, French, Chinese, German, and other languages; quality can vary by language and task.
- Input: text up to 20,000 characters.
- Instructions: optional text up to 4,000 characters.
- Output: generated text, up to 4,096 tokens per request.
- Conversation context: include prior messages in the input when your app needs continuity.
- Knowledge: optional; set
use_knowledge: trueafter project files are linked and ready. - Sources: Knowledge responses include the filenames used and their relevance scores.
Knowledge request and response
const response = await fetch("/_orchard/llm", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
input: "What is our refund policy?",
use_knowledge: true
})
});
const { text, sources } = await response.json();
// sources: [{ filename: "handbook.pdf", score: 0.91 }]
Choose the right service
Use LLM for natural-language text generation. Use Database for records, Storage for file uploads, Auth for login, and Analytics for app activity. Orchard LLM is currently a text-generation runtime with optional project Knowledge. The generation endpoint does not accept raw file bytes; sources are uploaded and linked beforehand. It does not search the live web, generate images, call tools, preserve conversation history automatically, or enforce a JSON schema. A static app published with Orchard Deploy can call it after the builder explicitly enables deployed-site access; no project API key is placed in browser code.
Ask your agent
Paste one of these into your coding agent:
- "Add a server-side LLM reply feature to this support form."
- "Summarize the text a user pastes into this page."
- "Rewrite this user message in a friendly, professional tone."
- "Classify incoming feedback as a bug, request, or question."
- "Extract the company name and requested date from this message."
- "Translate user input into the language selected in this app."
- "Let this Orchard Deploy site call LLM without a backend."
- "Make a support assistant that answers from these product-guide PDFs and shows its sources."
- "Use the files already in Orchard Storage as this app's Knowledge."
These requests may be written in the builder's language. Your coding agent
should select orchard_llm, enable it for the project,
and use the returned server or Orchard Deploy integration guide.
Orchard Deploy sites
The builder can enable public deployed-site access with
set_browser_access. Frontend code then posts to
/_orchard/llm on its own deployed address. Anyone able
to call that public site can create LLM usage until the plan limit
or account spending cap stops further usage. Login and any
additional abuse controls are the builder's responsibility.
In your dashboard
You don't create a model account or paste credentials into your app. After your agent enables LLM, you can check:
- Projects → LLM: view status, model, requests, input tokens, cached input, and output tokens; pause or reactivate generation.
- Knowledge status: ask your agent to show linked filenames and whether each source is processing, ready, or needs attention.
- Billing: see included LLM processing, estimated overage, and your account-wide spending cap.
LLM pricing
The Free plan includes $0.20 of LLM processing per billing period. Builder includes $0.40, then charges only for usage above that amount.
- Input: $0.25 per million tokens after the included amount.
- Cached input: $0.025 per million tokens after the included amount.
- Output: $1.50 per million tokens after the included amount.