AI tools like Claude and ChatGPT provide a natural language prompt interface to LLMs to query the world’s knowledge. When it comes to including your business data, the pattern is also pretty understood: you utilize a RAG (Retrieval-Augmented Generation) to provide your data at query time. Where things get more complicated is when you are building an app for your customers to add their data in order for your system to provide insights. Unlike connecting your business app, you, as the app developer should never have access to the customer credentials for each of their connected data sources.
Airbyte Embedded solves the problem of customer onboarding of their apps/data sources and secure credential management via an embedded widget that you, as an app developer, can provide to your customer. We demo’ed it recently in a webinar . As we continue to work with more partners however, we kept hearing that they also needed an easy way via the API to proxy a request on behalf of their customer to the connected endpoint.
Still following? Let me explain with an example.
Imagine that you are an app developer building an AI app for users to connect all of their financial institutions. Once connected, they can use prompts to ask and analyze the information. As a developer, you don’t want to manage the customers credentials, but you need to call APIs on their behalf to fetch data which can be used in AI tools and workflows. This type of call is what we call a proxy request.
To enable use cases as described above, we just introduced a new endpoint to Airbyte Embedded that enables you to make a proxy request on behalf of your customer. This proxy request endpoint fetches the stored credentials the customer provided when onboarding the specific connector, and returns the results of an API request. At the time of writing, proxy requests is still in Alpha with connector support limited to Stripe. We are actively working on adding more connectors as we gather feedback from customers.
Proxy Requests allow app developers to perform API calls on behalf of their customers
Here is an example of what this would look like using curl:
curl -X POST -H 'Content-Type: application/json' \ -H 'Authorization: Bearer {AIRBYTE_ACCESS_TOKEN}' \ -d {"method": "GET", "url": "https://api.stripe.com/v1/invoices", "headers": {"additional_header_key": "value"}}' \ 'https://api.airbyte.ai/api/v1/sonar/apis/{SOURCE_ID}/request'Breaking down the example above, there are three important components:
A bearer token to access Airbyte. If you are using python, you can utilize this library to fetch an access token and manage refresh. A URL endpoint of an external service. In a traditional Airbyte connector, this would equate to a stream. A source connector id from a source which a customer has added onboarded via the Embedded Widget . Prompt Injection to LLMs The best thing about proxy requests is that you can pass the results directly to an an LLM as part of the prompt. For example, continuing with the Customer invoices example, you could ask the LLM to “analyze the outstanding invoices I have and provide a strategy for managing them” , and return the results to the user. Now, using their own data, and an LLM, your app serves up the information allowing your customers to make better, more informed decisions for their business.
# Create prompt for OpenAI prompt = f""" I have customer spending data from my Stripe account based on invoices. Please analyze this data and tell me which customer has spent the most money with me. Here are the top customers by spending (based on paid invoices): {json.dumps(top_customers_data, indent=2)} Please provide: 1. The name and details of the top spending customer 2. Their total spending amount from paid invoices 3. A brief analysis of their invoice payment pattern 4. Any insights about the top customers in general Format your response in a clear, business-friendly manner. """This approach of prompt injecting the data is very useful for smaller datasets, but developers should pay attention to the size of the data returned from the proxy request. Passing a large dataset to the LLM make quickly overrun context windows, and be extremely inefficient in terms of performance and memory. Thankfully, most APIs provide in-built filtering to ensure you return exactly the subset of data you need. Proxy Requests fully supports passing in query parameters.
Stripe, for example allows you to pass in a particular customer id as a query parameter:
curl -X POST -H 'Content-Type: application/json' \ -H 'Authorization: Bearer {AIRBYTE_ACCESS_TOKEN}' \ -d '{ "method": "GET", "url": "https://api.stripe.com/v1/invoices?customer=cus_ABC123456789", }' \ 'https://api.airbyte.ai/api/v1/sonar/apis/{SOURCE_ID}/request'With the data correctly filtered, you could call an LLM providing the system role (business analyst) and prompt (with relevant customer context). The example below uses the OpenAI Chat Completions API to perform the analysis:
try: response = self.openai_client.chat.completions.create( model="gpt-3.5-turbo", messages=[ {"role": "system", "content": "You are a helpful business analyst specializing in customer data analysis."}, {"role": "user", "content": prompt} ], max_tokens=1000, temperature=0.3 ) return response.choices[0].message.content except Exception as e: print(f"Error calling OpenAI API: {e}") return f"Error analyzing data with OpenAI: {e}"Power Agentic Workflows Proxy Requests, and the ability to make a call on behalf of a customer, unlocks the ability for app developers to use Airbyte Embedded as part of an agentic workflow created in tools such as N8N or Manus . Using the same example above, we can add a proxy request call into N8N, pass the results to an AI agent node to perform analysis, and return the results to the next step in your workflow. This could be a messaging channel like Slack , a Vector DB for later Embeddings searches, or a data lake like Snowflake or Databricks etc.
Using Airbyte Embedded Proxy Requests in n8n
Summary The new Proxy Requests feature is available in Alpha for Airbyte Embedded customers. Using Proxy Requests are an incredibly useful way for AI app developers to leverage customer endpoints onboarded via Airbyte Embedded. It eliminates the complexity and security concerns of managing customer credentials, and allows developers to easily add customer data into their context aware apps, share data with AI tools, and power agentic workflows and agents, all with a single API call.
Check out the full code example, and make sure you join us on August 8th for a webinar on how to Airbyte and MCP services in your apps. (Tip: By subscribing to the Airbyte YouTube channel you will automatically be reminded of this webinar, and be the first to know up upcoming live events)
Limitless data movement with free Alpha and Beta connectors
Introducing: our Free Connector Program ->