
| Article details | |
|---|---|
| Author | Ben Bajek, Principal Forward Deployed Engineer |
| Published / updated | 30 November 2026 |
| Customer | Consumer products manufacturing, 1,000 to 5,000 employees, global |
| Platform and tools | OpenAPI and Swagger specs; Maia custom connectors, AI import, endpoint editor |
| Reading time | 4 min |
Maia's custom connector AI import failed on large OpenAPI specs and JavaScript documentation portals because it sent the whole document to the model in one request, so we changed it to build the endpoint list from the spec in code and summarize large documentation in sections. In local testing, a 1.5 MB spec that was rejected before listed all 326 endpoints.
Why does the custom connector import fail on large APIs?
Maia's custom connector AI import, for REST APIs Maia has no connector for, reads the API's documentation, works out authentication and paging, and offers the endpoints it found (custom connector guide). This post covers the import on the custom connector page.
The import sent the whole document to the model in one request, so Elexon's 1.5 MB Balancing Mechanism Reporting Service (BMRS) spec, about 430,000 tokens, was rejected above about 146,000 input tokens. A JavaScript portal that links dozens of separate specs returned 0 endpoints.
The given content is too large to processWhy did it matter?
A global consumer products manufacturer brought this work to us: its vendor documents its API in a JavaScript portal that links dozens of specs, and the import returned no endpoints to build a custom connector from.
What did we change in the import?
- Made the import parse OpenAPI and Swagger files in code and build the endpoint list from them, so no single request holds the whole spec.
- Split large documentation into sections, shown in a progress panel and a grouped endpoint picker, so one failed section no longer loses the rest.
- Stripped site menus from crawled pages, which in testing took the Google Cloud Firestore REST API reference from 10.6 million characters, which failed as too large, to 496,000, which imported in 3 parts.
- Followed JavaScript-only pages, including Swagger UI pages, to the spec file they load, and raised uploads to 25 MB.
- Made the crawler follow
rel="next"links, Docusaurus pagination, and?page=2lists within the same folder, up to 100 pages. - Listed POST endpoints from specs, each with its method and a body drawn from the spec.
- Named the site's error status instead of "Unable to fetch web content".
We didn't let the import guess which POST endpoints only read data: a naming rule misclassified them both ways across 5 public specs, so the import never sends a POST.
What was the result?
| Measure | Before | After | Timeframe |
|---|---|---|---|
| Elexon BMRS spec, 1.5 MB | "The given content is too large to process" | All 326 GET endpoints listed | Local test, 10 November 2026 |
| POST endpoints from a spec | GET only | Listed with method and body; 0 POST requests sent to a contacts API | Local test, November 2026 |
| Crawler and spec parsing | Approved 3 November 2026 | In production 19 November 2026 | 16 days |
| Importer screens (progress panel, grouped and POST pickers, 25 MB uploads) | Approved 3 November 2026 | In production by 1 December 2026 | 28 days or fewer |
We measured the counts in local runs against public APIs, not the customer's own API.
When does this apply to you?
This applies to any API whose reference is generated from a spec, as many payment, CRM, commerce, and cloud APIs are: give the import the spec, not the portal. To see the import on a real API, watch Maia build a custom API connector from documentation, or read how Maia builds custom API connectors.
The import is the wrong choice for GraphQL, and docs pages without a spec import GET endpoints only. POST endpoints import with no paging, so APIs that take their cursor in the request body, such as HubSpot CRM search, return only the first page.
The crawler stops at 100 pages. A portal that links many specs imports one spec at a time.
Frequently Asked Questions
Older versions sent the whole API document to the model in one request, and very large specs ran past its input limit. The import now builds the endpoint list from the spec in code, so a 1.5 MB spec listed all 326 endpoints in testing.
Yes: link the spec or upload a spec file of up to 25 MB, and the import lists every GET endpoint, grouped by section.
Yes, from an OpenAPI or Swagger spec, each with its method and a request body drawn from the spec. The import never sends a POST and doesn't page POST endpoints, so test each one in the endpoint editor.
Featuring
Our latest resources
Data management



