OpenAI API Integration: Add GPT to Your App

View this page

How to integrate the OpenAI API into an existing app: the server-side flow, structured outputs, cost per request from OpenAI's October 2026 prices, rate-limit tiers and data controls.

Organisation
WavX Solutions
Telephone
+919310079927

Description

Integration OpenAI API integration: adding GPT models to your app or system

An OpenAI API integration adds a model call to software you already run, from your server, never from the browser: your code sends the text and instructions, asks for output in a fixed JSON schema, checks it, and records the tokens used. As of October 2026 OpenAI prices per million tokens, from $0.10 input on GPT-6 Luna to $10 on GPT-6 Astra, so the model you pick sets the running cost.

Discuss an integration Last updated 2 October 2026

What the integration connects

The OpenAI API connects a language model to software you already run: a CRM, a support inbox, an order system, an admin panel. Typical first features are small and specific: classify an incoming enquiry and draft a reply, summarise a long ticket, pull fields out of a supplier's invoice, or answer questions from your own help pages.

The integration is a backend service. It collects the right data from your system, sends it to the model with instructions, checks what comes back, and writes the result where your staff will see it. The browser or mobile app never holds the API key. Choosing which feature to build first, and whether it needs your documents or live records, is covered on add AI to your existing software .

Data flow: classify and draft a reply to an enquiry

New enquiry in your system (website form, email, WhatsApp)

Your server ── remove what the model does not need (IDs, card numbers)

── build request: model, instructions, input text,

output schema {category, urgency, draft_reply}

POST https://api.openai.com/v1/responses

Response ── status complete? refusal? parse JSON against the schema

── read usage: input and output tokens → log cost per request

├── valid ──▶ save category and urgency; put draft in the agent's queue

└── invalid ─▶ retry once, then route to a person unclassified

The draft is a suggestion. A person sends it. That design choice, not the model, is what keeps a wrong answer from reaching a customer.

Field mapping

Your system

Request or response field

Notes

Fixed rules: tone, categories, what not to say

instructions

Kept in your code under version control, not typed per request

The enquiry text and relevant record fields

input

Only the fields the task needs

Allowed categories and output shape

text.format with type: json_schema , strict: true

Structured outputs make the reply follow your schema

Maximum length

max_output_tokens

If it is hit, the response is incomplete and will not match the schema

Whether OpenAI keeps the conversation state

store

Set false when you do not need it

Result

Parsed JSON in the output

Validate again in your own code before saving

Cost tracking

usage input and output token counts

Stored per request, so cost per feature is known

Safety refusals

refusal

Handled as its own outcome, not as an error

Cost per request

Prices below are OpenAI's standard rates per million tokens, read on 2 October 2026. They are billed in US dollars and change often.

Model (OpenAI's description)

Input

Cached input

Output

One request: 1,500 in, 300 out

10,000 such requests

GPT-6 Luna ("most efficient … high-volume tasks")

$0.10

$0.01

$0.50

$0.0003

$3

GPT-6.1 Sol ("near-Astra performance … at a lower cost")

$2.00

$10.00

$0.006

$60

GPT-6 Astra ("most capable … most demanding work")

$1.00

$50.00

$0.03

$300

The arithmetic is tokens × price ÷ 1,000,000, input and output added. Three things move the real figure: how much context you send (a long policy document in every request multiplies input cost), whether repeated context is served at the cached-input rate, and whether the work can wait, since OpenAI's Batch API is priced at half the standard rate. Regional data-residency endpoints add 10% for models released on or after 5 March 2026.

For a classification task, the cheapest model that passes your test set is usually the right one. Testing on a few hundred real enquiries before choosing is cheaper than guessing.

Limits and gotchas

Issue

What OpenAI documents or what happens

What the integration does

Rate limits

Measured in requests and tokens per minute and per day; set per organisation and project, and by model

Queue requests; back off on 429 with a random delay

Usage tiers

Tier 1 needs $5 paid and has a $100 monthly limit; Tier 5 needs $1,000 paid and allows $200,000

Plan the tier before launch; a new account cannot absorb a large launch

Output cut off

max_output_tokens reached; JSON incomplete

Check status ; size the limit to the schema

Wrong but well-formed answers

The schema fixes the shape of the answer, not its truth

Validate values against your own data; keep a person in the loop for anything sent out

Personal data

Sent to a third party

Strip what is not needed; record it in your privacy notice

Model retirement

Older models stay on the price list for a while, then go

Keep the model name in configuration and a test set to re-run on a new model

Key leakage

A key in a mobile app or web page can be copied

Calls only from your server; separate keys per project

When answers are wrong because the model lacks your information, the fix is usually retrieval over your documents, not a bigger model; see what RAG is and RAG development . If a deployed assistant is already misbehaving, read AI chatbot giving wrong answers.

What WavX builds

WavX builds the server-side service around the model: data preparation and redaction, prompt and schema in version control, a test set from your own records, validation of every response, retries and queueing, per-request cost logging, and a screen where staff review what the AI produced. The same service can call Anthropic's models instead; see Claude API integration and the comparison of OpenAI, Claude and Gemini APIs.

Effort band

The AI cost calculator prices an AI feature in an existing app from a ₹2,50,000 base, a planning range of ₹2,12,500 to ₹3,12,500 when no custom data is needed, and higher when it works on your documents or live systems. These are planning ranges, not quotes. Model usage is paid to OpenAI separately, on your own account.

When not to integrate the API

If staff only need help writing emails or summarising documents, ChatGPT subscriptions for those staff are cheaper than any integration. If the task is a fixed rule (route by pincode, flag orders over a value), ordinary code is cheaper, faster and never wrong in new ways. Integrate the API when the task needs language understanding, runs inside your system, and is frequent enough that copying text into a chat window costs real staff time.

Frequently asked questions

Is the OpenAI API the same as ChatGPT?

No. ChatGPT is OpenAI's app for people. The API is a paid service your software calls, billed per token, with its own models, limits and data terms. Integrating 'ChatGPT' into a product means calling the API from your server.

Will OpenAI train its models on our customers' data?

OpenAI's data controls page says data sent to the API is not used to train or improve its models unless you opt in. Abuse-monitoring logs are kept for up to 30 days unless the law requires longer, and some endpoints are eligible for Zero Data Retention on approval. Your own privacy notice and consent still need to cover sending the data.

Can the data stay in India?

Partly. OpenAI lists India among its data residency options, through an in.api.openai.com domain, but as of October 2026 it offers regional storage there, not regional processing. Regional endpoints carry a 10% price uplift for models released on or after 5 March 2026.

How much will the API cost us each month?

Multiply requests by tokens per request by the model's price. A request with 1,500 input and 300 output tokens costs about $0.0003 on GPT-6 Luna and $0.006 on GPT-6.1 Sol at October 2026 prices. We measure real token counts on your data before you commit to a model.

Sources

OpenAI API docs: Pricing · read 2 October 2026

OpenAI API docs: Models · read 2 October 2026

OpenAI API docs: Rate limits · read 2 October 2026

OpenAI API docs: Data controls (your data) · read 2 October 2026

OpenAI API docs: Structured outputs · read 2 October 2026

Related

Add AI to your existing software

Anthropic Claude API integration

How to add AI to your app or website

AI cost calculator

Build your own software — your way, your pricing.

WavX Solutions is here to create your own software in a fully custom way, built exactly how you work — with a pricing model that fits your business. Connect now and let's build it.

Contact Now helpwavx@gmail.com

Reference material from WavX Solutions

Related questions WavX has answered

What does WavX's cost model show for adding an AI feature to an existing app?

Adding an AI feature to an existing app starts at ₹2.5 lakh in WavX's published cost model, with a range of ₹2.13L–₹3.13L before add-ons, roughly $2,600–3,800 as an approximate conversion; the quote itself is built in INR. A data multiplier applies: 1.25 when the feature reads documents and 1.5 when it connects to live systems. Because it plugs into the app you already have, there is no new platform to pay for. Builds under ₹3 lakh fall in the 3–6 week band. WavX is open to negotiating the figure after a free consultation. Source

Our 40-page company website in Pune is a client-side React app, and an audit says AI engines cannot read it. I need a rough idea of what moving it to server-side rendering will cost and what decides the price before I ask my director for budget.?

WavX does not publish a fixed price for moving an existing React app to server-side rendering; it quotes after a free consultation because the effort depends on the codebase. The drivers are how cleanly the components are written, how much data is fetched in the browser and must move to the server, logins or dashboards mixed into public pages, and the number of page templates. If a rebuild proves simpler, WavX's website calculator starts a business website at ₹50,000, with extra pages from ₹10,000 each. The figure is negotiable. Share repository access at helpwavx@gmail.com. Source

Aadhaar ekyc and pan verification api integration in loan app?

Aadhaar e-KYC and PAN verification are added to a loan app through a KYC provider's API rather than built from nothing. The app collects consent and the identity number, the server calls the provider, and the response either fills the applicant's verified details or flags a mismatch for manual review. The lender signs the agreement with the provider and holds the credentials; the developer wires the flow, stores only what your policy allows, masks numbers on screen and logs every check. Which checks you are permitted and required to run is your compliance team's call. Source

Can chatbot data stay inside the EU when using OpenAI or Anthropic models?

The data you control can stay in the EU by design; the model call itself is governed by the provider's terms and the plan chosen. Conversation logs, the document index and customer records can be hosted in an EU cloud region. Where the model processes each request, and how long the provider retains inputs, is set by that provider's regional options and data-processing terms, which differ by product and plan and should be read directly. Some companies reach these models through a cloud platform's EU region for that reason. Source

My business in India already runs on a custom web system; what does adding a mobile app for it cost?

A companion mobile app is a ₹2,00,000 add-on in WavX's software estimator when the backend and APIs already exist, which is why it costs less than a standalone build. If the web system was built elsewhere or has no APIs, the app is priced through the app model instead, where a simple app starts at ₹1,50,000 (₹1.28L–₹1.88L) and a medium one at ₹4,00,000. The condition of the existing APIs decides which applies. Reusing your backend is the main saving. WavX can negotiate the figure once it reviews the system. Source

Our company runs on an older ERP with no API, just a SQL database. Management wants a mobile app so sales staff can check stock and customer balances and place orders. How do you put an app on a system like that safely?

Put a small API layer between the app and the ERP instead of letting phones touch the database. The layer reads stock and balances through read-only queries or views, caches them, and exposes only what the app needs. Orders from the app go into a holding table or the ERP's own import route, so its business rules still apply, and nothing is written directly into core tables. Add authentication, per-user permissions and an audit log. WavX builds custom APIs and legacy integrations of this kind. Source

My freelancer built a custom app for my Shopify store two years ago and has now stopped responding. The app still runs, but I have no idea where the code lives or who pays for the server. How do I find out what I have and get control of it?

Start in your Shopify admin: the apps section shows the custom app, its permissions and the URL it calls, and that URL reveals where it is hosted. Then check your own card and email for a cloud or hosting bill; if there is none, the freelancer's account is paying and the app can stop without warning. Ask in writing for the repository and hosting to be transferred. If nothing comes back, a developer can document what the app does from its behaviour and rebuild it under your accounts. Source

I work in IT at a facilities management company in Doha. Our old on-premise maintenance system stores everything in Arabic and has no API, and management wants a modern dashboard and mobile app on top of it without switching it off. What approach would you take?

Leave the old system running and build a reporting layer beside it. A scheduled job copies the maintenance data from its database into a cloud database, taking care to preserve the Arabic text encoding, and the new dashboard and mobile app read from that copy. If technicians must update jobs from the app, writes go back through whatever import route the old system accepts, tested heavily. Over time, new modules can take over functions one by one. WavX's working day runs 7:30 AM–4:30 PM Qatar time. Source

WavX starting prices (base scope, before add-on features)

From the cost model behind the WavX calculators. A quote follows a scoping call; features, integrations and scale move these figures. Annual maintenance is typically 15–25% of the build cost.

BuildStarting priceTypical timeline
Landing pagefrom ₹40,0003–6 weeks
Business websitefrom ₹50,0003–6 weeks
E-commerce storefrom ₹1,50,0003–6 weeks
Internal tool / dashboardfrom ₹2,00,0003–6 weeks
Custom web applicationfrom ₹4,50,0006–10 weeks
SaaS productfrom ₹7,00,00010–16 weeks
ERP / CRM systemfrom ₹9,00,00010–16 weeks
AI chatbotfrom ₹1,50,0003–6 weeks
RAG assistant (your data)from ₹3,50,0006–10 weeks
AI agent / automationfrom ₹5,00,0006–10 weeks
AI feature in an appfrom ₹2,50,0003–6 weeks

Calculators: website, software, AI, mobile app. Pricing explained: https://www.wavxsolutions.in/pricing.

About WavX Solutions

WavX Solutions (WAVX — Web Application & Venture Exchange) is a remote-first, 100% custom software development company founded in 2022 in Gurgaon, Delhi NCR, India. WAVX designs, builds, scales and maintains custom websites, web applications, iOS and Android apps, Shopify stores, ERP/CRM software, loyalty systems, AI integrations and performance marketing for startups, businesses, brands and institutions across India.