Private LLMs vs public AI APIs: when your business data should stay in-house

Compare private LLMs and public AI APIs on security, cost and data residency, and learn how to deploy AI on sensitive data under India's DPDP Act.

Kiran PSSenior Consultant, Sigosoft Updated 21 min read
Private LLMs vs public AI APIs: when your business data should stay in-house

Most companies do not need a fully on-premise LLM. They need a model hosted in their own cloud account for workloads that touch regulated personal data, such as patient notes, and a public AI API under an enterprise agreement for everything else. A private model earns its cost when residency rules, sector regulation or high, steady volume make a shared service the wrong call.

If your AI use today is drafting marketing copy or helping developers write code, a public API with the right contract is usually enough. The harder question is the workload that reads customer records. That is where “private” stops being one option and becomes three.

What is a private LLM, and how is it different from calling ChatGPT or Claude through an API?

A private LLM is a language model deployed so that your organisation, rather than a shared public service, decides where it runs, who can reach it and where its prompts and logs are kept. Calling ChatGPT or Claude through an API sends each request to the vendor’s infrastructure, where it is processed under the vendor’s commercial terms. Private does not mean that no third party is ever involved, and the degree of control depends on the arrangement you choose.

A large language model (LLM) is the software that reads text and writes text back, the engine behind ChatGPT, Claude and Gemini. A public AI API is a paid connection your application uses to send text to a vendor’s model; your data leaves your network on every call. Many vendors’ business terms say API data is not used for model training by default, and some offer shorter or zero retention on request, but the details differ by vendor, product and contract tier.

“Private” covers four arrangements, listed here from least to most control:

  • Managed model in your cloud account.
    A cloud provider such as Amazon Web Services, Microsoft Azure or Google Cloud runs the model as a service in a region you choose, billed to your account. Your data stays within that provider’s environment, but the provider still operates the service and may process requests for operations or abuse monitoring, depending on its terms.
  • Self-hosted model on rented GPUs.
    You run the model yourself on GPU servers inside your own virtual private cloud (VPC), a network segment only your systems can reach. You control the model and its logs; the cloud provider still runs the physical hardware.
  • Your own servers in a colocation facility.
    You own the hardware and the software stack, while a third-party data centre provides power, cooling and physical security under contract.
  • Fully on-premise.
    The model runs on servers in your own data centre or server room. Nothing leaves the building unless your systems send it, though hardware and software vendors may still need support access unless the site is isolated.

The more of the stack you run, the more control you have, and the more maintenance you own.

An infrastructure engineer checking a server in an enterprise data centre used for private AI deployment

Two more terms come up throughout. An open-weight model is one whose trained parameters (the “weights”) are published, so you can download and run it yourself; Meta’s Llama, Mistral, Qwen and Google’s Gemma families are examples. Retrieval-augmented generation (RAG) means the model answers from your own documents: your system finds the relevant passages in your files and hands them to the model with the question.

Which of the three deployment options fits which workload?

A public AI API under an enterprise agreement fits low-risk work, a private cloud deployment fits most regulated workloads, and on-premise fits the narrow cases where data cannot leave your premises at all. The table compares where each one runs. Which model you can use is a separate question, covered just after it.

Public AI API with enterprise agreementPrivate cloud deploymentOn-premise deployment
Where data goesTo the vendor’s infrastructure on every request. Retention, training use and subprocessors depend on your contract.Stays in your cloud account and chosen region. On a managed service, the provider may still process requests for operations or abuse monitoring under its terms.Stays on your hardware, subject to any vendor support access you allow.
Data residency controlLimited. Some vendors offer regional processing or storage; availability varies by model, region and contract. Confirm in writing.Strong, if the provider has a region in the right country and offers your chosen model there.Full. You decide where the servers sit.
Model qualityAccess to the vendor’s newest proprietary models, usually first.Managed: many leading proprietary models are offered in major clouds, though not in every region and sometimes later than on the vendor’s own API. Self-hosted: open-weight models only.Open-weight models your hardware can run. The gap with the top proprietary models varies by task and language, so test on your own data.
Set-up effortLow: contract review and application code.Medium: network design, access policies, deployment, monitoring.High: hardware procurement, serving software, updates, physical security.
Running cost driversPer-token pricing (a token is roughly a word fragment). No cost when idle.Managed: per-token pricing or reserved capacity. Self-hosted: GPU hours whether busy or idle, plus engineering time.Hardware purchase, power, cooling, space, staff time and a hardware refresh cycle. Cheap per request only at high, steady volume.
Who maintains itVendor runs the model; you run the integration.Managed: provider runs the model service. Self-hosted: your team or partner runs the model; the provider runs the hardware.Your team or partner, entirely.
Best forMarketing copy, internal drafting, coding help, public or properly anonymised data.Patient records, financial data, customer support on personal data, RAG over internal documents.Defence, some government work, isolated industrial sites, cases where a regulator or contract rules out external processing.
Watch-outsTerms can change. Prompts may be retained for abuse monitoring even with training switched off.Model availability differs by region. Always-on GPU costs surprise teams that expected per-request pricing.Hardware ages. You own patching, evaluation and licence checks for every model you run.

Open-weight and proprietary describe the model’s licence, not where it runs. Open-weight models can run in any of the three columns, including through public APIs offered by hosting companies. Proprietary models are usually available only through the vendor’s own API or as managed services in the major clouds, so a fully on-premise deployment normally means an open-weight model.

Most companies reading this will land in the middle column for sensitive workloads and the first column for the rest, which puts each workload where its risk and cost make sense.

Is it safe to send customer data to an AI model under the DPDP Act and other rules?

It can be lawful in all three deployment models, provided the provider is engaged under a proper contract, you know where prompts and logs are stored, and you can meet the breach reporting and retention rules that apply to you. The model’s location is one input to that judgement. The contract, the architecture and the logging matter as much.

India: DPDP Act 2023 and DPDP Rules 2025

The Digital Personal Data Protection Act, 2023 is being brought into force in phases. The DPDP Rules, 2025 (G.S.R. 846(E), dated 13 November 2025) set three stages: the Data Protection Board provisions on publication, consent manager rules one year later, and the operative rules on notice, security safeguards, breach intimation and retention eighteen months after publication. That last stage falls in mid-May 2027. Because the Gazette is dated 13 November 2025 but the Press Information Bureau gives 14 November as the notification date, the operative date works out to 13 or 14 May 2027; plan for the earlier one.

Whether an AI prompt or response falls under the Act depends on its content. The Act covers digital data about an individual who is identifiable by or in relation to that data. A prompt asking for a summary of a public policy is not personal data; a prompt containing a customer’s name, phone number or account history is, and so is the stored response if it repeats or infers details about that person. In practice, support, healthcare and finance workloads will almost always involve personal data.

Here is what the law requires once the operative rules apply:

  • You stay responsible when a vendor processes data for you.
    Under Section 8 of the Act, the Data Fiduciary (the business deciding why and how data is processed) remains accountable for processing done on its behalf, and may engage a Data Processor only under a valid contract. An AI vendor or cloud provider handling your prompts is typically a processor.
  • Breach intimation.
    Rule 7 requires you to inform affected individuals and the Data Protection Board of India without delay, and to give the Board a detailed report within 72 hours of becoming aware of the breach, or a longer period the Board allows.
  • Two separate one-year log rules.
    Rule 6(1)(e) requires logs and personal data needed to detect and investigate unauthorised access to be retained for one year, unless another law requires otherwise. Rule 8(3) separately requires personal data, traffic data and processing logs, including those held by a processor, to be kept for at least one year from processing for the purposes in the Seventh Schedule, and then erased unless another law requires longer.
  • Cross-border transfer is permitted by default.
    Section 16 lets the Central Government restrict transfers to specific countries by notification, and Rule 15 lets it set conditions on making data available to foreign states. There is no blanket requirement to keep all personal data in India.
  • Two exceptions narrow that freedom.
    Section 16(2) preserves stricter sector laws: the Reserve Bank of India’s 2018 directive on storage of payment system data requires payment system data to be stored only in India, which matters for fintech AI workloads. And under Rule 13(4), a Significant Data Fiduciary must keep personal data that the government specifies, on a committee’s recommendation, from being transferred outside India.

Our recommendations go beyond the legal minimum. Choose an AI provider whose contract commits it to notify you of incidents quickly enough for you to meet the 72-hour report. Keep prompts and logs in an Indian region where you can, even when the law does not require it, because it simplifies sector rules and any future Significant Data Fiduciary designation. And keep the personal data inside stored prompts to the minimum you need, since every log you are obliged to retain for a year is also a log you must protect.

A compliance officer and legal counsel reviewing a data processing agreement for an AI system

European Union: AI Act and the Digital Omnibus

If your AI system serves people in the EU, the EU Artificial Intelligence Act (Regulation (EU) 2024/1689) applies alongside the GDPR, including for providers and deployers outside the EU whose system’s output is used there. The Digital Omnibus on AI (Regulation (EU) 2026/1744) was adopted on 8 July 2026, published in the Official Journal on 24 July 2026 and entered into force on 27 July 2026. It moves the obligations for stand-alone high-risk systems listed in Annex III, such as AI used in employment, credit scoring or access to essential services, to 2 December 2027, and those for AI embedded in products regulated under Annex I, such as medical devices, to 2 August 2028.

Running a model privately does not take a system out of the AI Act. Obligations attach to your role (provider or deployer) and to what the system does, not to where it is hosted. A private deployment can make some duties easier to meet: for example, Article 26 requires deployers of high-risk systems to keep automatically generated logs under their control for at least six months, which is simpler when you hold the logs yourself.

UAE: federal law, health data and free zones

The UAE has no single rule that all data must stay in the country, but health data comes close. The Federal Personal Data Protection Law (Federal Decree-Law No. 45 of 2021), in force since 2 January 2022, allows transfers abroad to countries with adequate protection or under the safeguards and exceptions in Articles 22 and 23. It does not apply to health data or banking and credit data that have their own legislation, to government data, or to free zones with their own data protection laws, such as the Dubai International Financial Centre (DIFC) and Abu Dhabi Global Market (ADGM), which run separate regimes.

Health data is the strictest case. Article 13 of Federal Law No. 2 of 2019 on the use of ICT in health fields bars storing, processing, generating or transferring health data relating to health services provided in the UAE outside the country, except in cases approved by the health authorities. Ministerial Resolution No. 51 of 2021 lists those exceptions, and Emirate-level regulators such as the Department of Health in Abu Dhabi set their own standards. For an AI scribe or clinical assistant used with UAE patients, plan on in-country hosting unless counsel confirms an exception applies.

For banks, insurers and payment firms, sector rules from the Central Bank of the UAE, and from the DIFC or ADGM regulators for firms licensed there, govern where data may sit. Confirm the requirements for your licence category before choosing a deployment.

Saudi Arabia: PDPL, financial services and government data

Saudi Arabia permits personal data to leave the Kingdom, but under conditions, and some sectors expect in-Kingdom hosting. The Personal Data Protection Law, issued by Royal Decree M/19 and amended in 2023, came into force on 14 September 2023 and has been enforced by the Saudi Data and Artificial Intelligence Authority (SDAIA) since 14 September 2024. SDAIA’s amended Regulation on Personal Data Transfer outside the Kingdom, in force from 1 September 2024, allows transfers to countries with an adequate level of protection or under safeguards such as standard contractual clauses, with a risk assessment required in certain cases.

Financial institutions face a stricter rule. The Saudi Central Bank’s rulebook on cloud computing says regulated firms should, in principle, use cloud services located in Saudi Arabia, need explicit SAMA approval to use cloud services outside it, and must obtain approval before signing with a cloud provider. Government bodies and operators of critical national infrastructure also fall under National Cybersecurity Authority controls for cloud use, which include hosting requirements; check which controls apply to your classification.

This is not legal advice; confirm with your counsel.

Does RAG remove the need for a private model?

No. RAG decides what the model reads, while the location of the model still decides where your data goes. When your system retrieves passages from your documents and adds them to the prompt, those passages travel to wherever the model runs. If the model is a public API, your contracts, policies or patient notes are now in a request to that vendor.

RAG does help. You rarely need to fine-tune (retrain) a model on your data, which keeps it out of model weights, and you control exactly which passages reach the model, so you can filter or mask personal data before sending.

For example, a hypothetical logistics company with a customer-service assistant could split the work like this. The document store, the search index and a personal-data detection step all run inside its own cloud account. Retrieved shipment records have names, phone numbers and addresses replaced with placeholders such as CUSTOMER_1, and only the masked text goes to a public API for summarising. The answer comes back, the real details are put back in inside the company’s environment, and the mapping table never leaves it.

A logistics operations manager reviewing shipment information on a tablet in a distribution centre

Two cautions apply. Masked data can still identify someone when other details remain, such as a delivery address pattern plus a time window, so masking reduces risk rather than removing it, and the text may still count as personal data. Detection tools also miss things in free text, unusual ID formats and regional languages, so test the masking on real samples before trusting it, and keep a private-model fallback for records that cannot be masked reliably.

How much infrastructure does an on-premise LLM need?

It depends on three things: model size, how much text each conversation holds, and how many conversations run at once. Model weights are the starting point, not the total. Production sizing has to add the memory each live conversation needs, plus headroom for the serving software.

Weights.
At 16-bit precision (FP16 or BF16), each parameter takes two bytes. An 8-billion-parameter model needs about 16 GB for its weights and a 70-billion-parameter model about 140 GB. That is the floor before a single request is served.

KV cache and concurrency.
While generating text, the model stores intermediate results for every token in the conversation, known as the key-value (KV) cache. Its size per token depends on the model’s architecture; for Llama 3.1 70B at 16-bit precision it is about 320 KB per token, so one 8,000-token conversation needs roughly 2.5 GB on top of the weights. Twenty such conversations at once need about 50 GB more. For Llama 3.1 8B the figure is about 128 KB per token, or roughly 1 GB for an 8,000-token conversation.

Working memory.
Serving software needs room for intermediate calculations and usually reserves a large share of GPU memory up front for the cache. In practice, an 8B model at 16-bit precision on a single 24 GB GPU leaves little room for many long conversations, and a 70B model at 16-bit precision needs at least two 80 GB-class GPUs for the weights alone, with more for real concurrency.

A technician fitting a GPU accelerator into a rack server used to run an on-premise language model

Quantisation.
Storing weights at 8-bit precision roughly halves weight memory, and 4-bit roughly quarters it, so a 70B model at 4 bits needs around 35 to 40 GB for weights. The KV cache can be quantised too. Quality loss depends on the method, the model and the task, and tends to show first in reasoning, maths and less common languages, so measure it on your own test set rather than relying on published benchmarks.

For production, size for peak concurrency and your response-time target rather than the average, add spare capacity so one failed GPU does not take the service down, and load-test before launch. Beyond the GPUs, plan for serving software that batches requests, a vector database for RAG, monitoring, backups and someone responsible for patching. Hardware is the visible cost; ongoing staff time is usually the larger one.

How should you decide, workload by workload?

Decide per workload. A single policy of “everything private” wastes money, and “everything through the API” usually breaks a compliance rule somewhere. This sequence works for most organisations:

  1. Classify the data each AI workload touches.
    Public, internal, personal, or sensitive personal (health, financial, children’s data). Be honest about what users will paste into a chat box, not just what the system is designed for.
  2. Decide per workload.
    List every current and planned AI use case and give each its own classification.
  3. Check residency and sector rules.
    For each workload with personal data, list the countries and regulators whose rules apply, and whether your cloud provider and model are available in a compliant region.
  4. Estimate volume.
    Rough monthly requests and average length show whether per-token pricing or dedicated GPUs costs less. Low or spiky volume favours per-token pricing.
  5. Choose the deployment.
    Map each workload to one of the three columns in the table above. Expect two or three columns in use across the company.
  6. Plan evaluation and logging before launch.
    Agree how you will measure answer quality, what you log, where logs are stored, who can read them and how long you keep them to meet the retention rules that apply.

Teams often skip step 6, and it is what an auditor will ask about first.

What does this look like for a telemedicine provider?

For example, a hypothetical telemedicine provider in India with doctors consulting by video would split its AI work by risk. Its AI medical scribe turns the consultation audio into a transcript with a speech-to-text model, then uses an LLM to draft a clinical note in the clinic’s template. Both models run as a private cloud deployment in an Indian region, the draft is stored with the patient record, and only the treating doctor can view or sign it.

A doctor holding a video consultation from her clinic while an AI scribe drafts the clinical note for review

The design choices follow the data. Audio and transcripts are sensitive health data, so they never go to a public API, and the provider deletes raw audio once the doctor signs the note, if its clinical and legal advisers agree that is appropriate. Every draft is reviewed by the doctor before it enters the record, because a scribe that invents a symptom creates clinical risk. The logs record who viewed and edited each note and are kept for the periods the DPDP Rules require.

The same company uses a public API under an enterprise agreement for marketing emails and internal policy summaries. None of that contains patient data, so the stronger model and lower set-up effort win. Its patient-facing symptom checker runs privately too, because patients will type personal details whatever the screen tells them.

If the provider later serves patients elsewhere, the rules change. UAE patients would bring in the health data localisation rule described above, which points to a UAE-hosted instance. US patients would bring in HIPAA: the US Department of Health and Human Services’ guidance on cloud computing says a cloud or AI provider handling electronic protected health information needs a business associate agreement, even if it stores only encrypted data. EU patients bring in the GDPR, including a processor contract under Article 28 and its rules on transfers.

Our article on HIPAA and GDPR requirements for AI apps covers both in more depth, and our telemedicine app development page covers the platform itself.

When is a private model overkill?

A private model is overkill when the data is not sensitive, volume is low and no rule requires the data to stay in one place. Running GPUs around the clock for a tool that drafts a handful of marketing emails a week is money you will not get back.

It is also overkill when nobody will maintain it. A self-hosted model that is not patched, monitored or re-evaluated becomes a security risk of its own, so a managed model in your cloud account is often the safer choice for moderately sensitive data.

And if your use case depends on the strongest reasoning available today, an open-weight model you can afford to host may not be good enough yet. Test before you commit.

What security controls does every option need?

Whichever column you choose, you need access control, prompt and response logging with sensible retention, adversarial testing and a penetration test before go-live. Running privately removes only one category of risk.

Access control means each user sees only the documents and functions their role allows, and in RAG systems it has to be enforced at the search layer, not only in the user interface. Leaks often start there: the search returns a document the user should never have seen, and the model summarises it. Apply the same permissions to retrieval that apply to the source system.

A security analyst reviewing access activity for an AI system in a security operations room

Logging needs a written policy that separates what the law requires from what you choose to keep. Map each log to its rule, such as one year for the security logs covered by the DPDP Rules or six months for high-risk systems under the EU AI Act, then minimise the personal data inside stored prompts and set access controls on the logs themselves.

Prompt injection is the attack specific to LLMs: hidden instructions inside a document, email or web page that try to make the model ignore its rules, leak data or misuse a connected tool. Treat retrieved content as untrusted, give the model only the permissions each task needs, and require human approval before it takes actions such as sending messages or changing records. Red-team testing then deliberately tries to break those controls, and vulnerability assessment and penetration testing (VAPT) checks the application, APIs and infrastructure around the model.

Sigosoft holds ISO/IEC 27001:2022 certification for its information security management system and offers DPDP Act compliance support and VAPT services. That certification covers how we run our own security; it does not make any particular AI deployment compliant, which depends on its design, your contracts and your controls. If your auditors prefer separation, the testing can sit with an independent firm instead.

Where Sigosoft fits, and where it doesn’t

We work on the parts of this that need engineering. That includes private AI and on-premise LLM deployment in a client’s own cloud account or data centre, and RAG over company documents with access control at the search layer. It also covers connecting models to ERP and CRM systems such as Odoo, ERPNext or a custom platform through MCP servers. The Model Context Protocol (MCP) is an open standard that lets an AI model call your tools and data through a controlled interface.

Around that sit the enterprise applications that use the models, and security and compliance support, including AI and LLM security testing. We would start with the workload classification above, because it decides how much private infrastructure you actually need. The wider range is on our AI solutions and enterprise software solutions pages. Work starts under an NDA, and you own 100% of the IP by contract.

We are not the right partner if you want to train a foundation model from scratch; that is research-lab work, and very few businesses need it. If you only need a chatbot on public website content, an off-the-shelf tool will serve you better. And we do not give legal opinions: we build to the requirements your counsel sets.

Frequently asked questions

Do we need to fine-tune a model, or is RAG enough?

For most business use cases, RAG is enough and easier to keep current, since you update documents rather than retrain. Fine-tuning helps when you need a consistent style, a specialised vocabulary or a fixed output format the base model struggles with. Start with RAG, measure the gaps on real examples, and fine-tune only for gaps RAG cannot close.

Can we start with a public API and move to a private model later?

Yes, if you plan for it. Put a thin internal layer between your application and the model so the rest of your code never calls a vendor directly. Keep your prompts, test cases and evaluation scores in your own repository. Switching then means changing one component and re-running your tests, rather than rewriting the application.

What happens if our API provider changes its data terms?

Your contract governs what the provider may do, so read the change-notice and termination clauses before signing. Keep a record of the terms in force on each date you sent data. If new terms are unacceptable, the internal model layer described above lets you move sensitive workloads to a private deployment without stopping the rest of your AI use.

Can we use open-weight models commercially without restrictions?

Not always. Licences vary: some use permissive terms such as Apache 2.0, while others, such as Meta’s Llama community licences, add an acceptable-use policy and extra conditions for very large services. Read the licence of the exact model version you deploy, keep a copy with your compliance records, and re-check it on every upgrade.

Does a private model need internet access to work?

No. Once the model weights and serving software are installed, an on-premise model can run fully offline, which is why isolated sites use them. You will still need a secure way to bring in updates, security patches and new model versions, usually through a controlled transfer process rather than a live connection.

Planning where your AI workloads run in 2027? Bring your list of use cases and the data each one touches to a discovery call, and we will map each to a column and scope the private part. Get in touch with our team.

Was this article helpful?
Kiran PS
Written by

Kiran PS Senior Consultant, Sigosoft

Kiran PS is a Senior Developer at Sigosoft, where he builds AI integrations and enterprise applications. His work covers private LLM deployment, retrieval-augmented generation (RAG) and connecting AI models to ERP and CRM systems. On the Sigosoft blog, he writes about the engineering decisions behind enterprise AI: where models should run, how they connect to business systems and how to keep company data secure.

Discussion

Start the discussion

Questions or experiences to share? Our team reads and replies.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Free Β· NDA first Β· 100% IP yours

Read enough? Let's build it.

Tell us the idea. Get a roadmap, with scope, timeline and cost, within 2 hours.

WhatsApp