Skip to main content

How to Use Baselayer with AI Assistants

AI assistants can significantly accelerate your Baselayer integration. By loading Baselayer’s documentation index into your session, the model can generate accurate code, explain API responses, and guide you through implementation - without you needing to manually search through reference pages. This guide shows you how to set up your AI assistant correctly and provides copy-paste prompts for every major Baselayer product.

Before You Start

Complete both steps before using any prompt below.

Step 1: Know your API key

The only difference between the sandbox and production environments is your API key. Both keys are available in the Baselayer console. Use your sandbox key while building and testing, and switch to your production key when you’re ready to go live. See Sandbox vs. Production Environments for a full breakdown.

Step 2: Load Baselayer’s documentation into your AI session

Baselayer provides a documentation index optimized for AI assistants at:
This file maps Baselayer’s complete documentation - every guide, API reference, and webhook - as direct links to clean markdown files. Loading this index gives the AI accurate knowledge of Baselayer’s endpoints, field names, and async patterns. Without it, the model will generate generic API code that is likely to be incorrect. To load it, start every new session with this instruction:
“Please fetch and read https://docs.baselayer.com/llms.txt before we begin. Once you’ve read it, confirm and wait for my next message.”
Wait for the model to confirm it has read the file before pasting any prompt below. If your AI assistant does not have web browsing enabled, visit the URL yourself, copy the full contents, and paste them at the top of your session instead.

How to Use These Prompts

Each prompt below is designed to be copied and pasted directly into your AI session after completing the steps above. Because the model has already loaded the documentation index, the prompts reference guide titles alongside their markdown source files - this gives the model precise context without relying on rendered web pages. The prompts are grouped into two phases:
  • Building Your Integration: Prompts 1–7 cover each major Baselayer product
  • Testing and Edge Cases: Prompts 8–9 cover sandbox setup and operational scenarios you will encounter before going to production

Building Your Integration

Start here if you are new to Baselayer or building your core KYB workflow.

2. Web Presence

Use this when you need to verify a business’s online presence, find its website, or predict its industry.

Use this if you are building a lending or credit product and need to check for existing liens or judgments.

Use this to check for active or historical litigation and bankruptcy filings.

5. Business Pre-Fill

Use this if you are building your initial onboarding flow and want to auto-complete business information for applicants.

6. Webhooks

Set this up alongside any other product - webhooks are how Baselayer notifies you when async jobs complete.

7. Portfolio Monitoring

Use this once your core KYB workflow is in place and you need ongoing monitoring for businesses in your portfolio.

Testing and Edge Cases

8. Set Up and Test in Sandbox

Complete this before writing integration code. Your sandbox API key is available in the Baselayer console and gives you a safe environment to validate requests before switching to your production key.

9. Handle an IRS Pending Response

Use this if your Business Search is returning a pending IRS state and you are not sure how to handle it.

Tips for Better Results

Specify your language and libraries. After pasting a prompt, add a line like “Use Python with the httpx library” or “Use Node.js with axios.” The AI will tailor all code examples accordingly. Ask follow-up questions. These prompts are starting points. If a response references a field or state you don’t recognize, ask: “What does a state of PENDING mean and how should I handle it in my workflow?” Verify field names against the API reference. AI assistants can occasionally produce incorrect field names. If a generated request body doesn’t match what you see in the Baselayer API reference, ask the model to re-read the relevant endpoint file and correct its answer. Start a new session for each product. Context windows have limits. If you are moving from one product to another, start a fresh session, reload llms.txt, and use the appropriate prompt.