ChatGPT integration

ChatGPT integration services for your product

My ChatGPT integration services cover the engineering of calling the OpenAI API – or Anthropic’s Claude, or both – from your product: choosing models, abstracting the provider, streaming, rate limits, cost and privacy. It’s for teams who have decided what to build and want the API layer done right the first time.

One clarification, because the term is used loosely: putting “ChatGPT” in your product means using the same models through the API, not embedding the ChatGPT app. The reverse – making your product usable from inside ChatGPT – is a different project, covered below.

Where an OpenAI integration usually goes wrong

The first version works: one API key, one model hard-coded, a prompt string in a controller. Then it reaches production traffic and the problems arrive together. Requests start failing with 429s at peak. Responses take long enough that users think the page has hung. The monthly bill doesn’t match anyone’s estimate. A new model is released and switching means touching forty files. Legal asks where customer data is going.

What I build

  • A provider-agnostic interface. One internal client for chat, structured output, tool calls and embeddings, with adapters for OpenAI, Anthropic or others behind it. Model names live in config. Switching is a measured decision, not a rewrite.
  • Model choice by eval, not hype. I run your real inputs through candidate models and compare quality, latency and cost per task. Often a smaller, cheaper model passes for most traffic, with a larger one reserved for hard cases. Prices change often, so check each provider’s current pricing page rather than trusting a blog post.
  • Streaming done end to end. Server-sent events from the provider through your backend to the browser, with cancellation when the user navigates away so you stop paying for tokens nobody reads.
  • Rate limits and retries. Providers limit requests and tokens per minute. I add a queue or token-bucket per tenant, exponential backoff with jitter on 429s and 5xx errors, honor retry-after headers, and set hard timeouts.
  • Structured outputs. JSON-schema-constrained responses where the provider supports it, validated on your side regardless.
  • Cost tracking. Tokens logged per request, per feature and per tenant, with budgets and alerts. Prompt caching where the provider supports it; trimming oversized context everywhere. See LLM cost optimization.
  • Secrets and keys. API keys server-side only, per-environment, rotated, and never shipped to a browser or mobile app.

Privacy and data handling

Before any customer data leaves your systems, I document what is sent, to which provider, under which terms. API data handling differs from the consumer ChatGPT app, and retention, training and regional-processing options vary by provider and agreement – I check the current terms rather than assuming. Fields that don’t need to be sent aren’t. Personal data gets redacted where the task allows. Your subprocessor list and privacy policy get updated to match.

User-supplied text can also carry instructions aimed at the model. I keep model output away from anything that executes, and the LLM guardrails guide covers the patterns.

Getting your product into ChatGPT and Claude

If what you actually want is for customers to use your product from inside ChatGPT, Claude or another AI client, the integration runs the other way. Those clients connect to external services through the Model Context Protocol, so the work is building a custom MCP server for your product, with OAuth and proper tool design. That’s often a better use of a first sprint than another chat box inside your app.

Scope and where this fits

This is the API layer. If the bigger challenge is the product feature around it – evals, fallbacks, data access and rollout – that’s AI integration. If the feature answers questions from your documents, you’ll also want RAG development.

I work inside your codebase with your engineers, start with a two-week sprint, and leave the integration documented and tested. I’ve spent 20+ years building production systems and run Craaft, where AI agents and humans share the same board through MCP and a REST API, so I see how AI agents behave against a real API in my own product.

When you don’t need this

If you’re making a handful of internal calls with no customer data, the provider’s SDK and their docs are enough – don’t pay for an abstraction layer you won’t use. Come back when traffic, cost or a second provider makes it matter.

Questions

Can I integrate ChatGPT into my website or app?

Yes, through the OpenAI API rather than the ChatGPT app itself. Your backend calls the API with your prompt and data and streams the response to your UI. Keep the API key on the server, add rate limiting, and track cost per user from day one.

Should we use OpenAI or Claude?

Test both on your own inputs. Quality, latency and price differ by task, and they change with every model release. Building behind a provider-agnostic interface lets you use each where it’s strongest and switch without a rewrite.

How do we handle OpenAI API rate limits?

Queue requests per tenant, retry 429 and transient 5xx errors with exponential backoff and jitter, respect retry-after headers, and set timeouts. Monitor usage against your tier’s limits and request increases before launches, not during them.

Is it safe to send customer data to the OpenAI API?

It can be, with the right agreement and design. Check the provider’s current API data-usage, retention and regional terms, send only fields the task needs, redact personal data where possible, and record the provider as a subprocessor.

Calling an LLM API in production?

Show me the current integration. In a two-week sprint we put a provider abstraction, retries, streaming and cost tracking in place and test a second model against the first.

GMT+2 · Full EU overlap · US East mornings

Related