Table of contents
Book a Maia Demo
Enjoy the freedom to do more with Maia on your side.
Dark green abstract background with subtle gradient shapes and rounded corners.

How to import a large OpenAPI spec when Maia's custom connector import says the content is too large

December 2, 2026
Scale
4 mins
326 endpoints
from one 1.5 MB OpenAPI spec, in testing
Summarise with AI
Article details
AuthorBen Bajek, Principal Forward Deployed Engineer
Published / updated30 November 2026
CustomerConsumer products manufacturing, 1,000 to 5,000 employees, global
Platform and toolsOpenAPI and Swagger specs; Maia custom connectors, AI import, endpoint editor
Reading time4 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 process

Why 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?

  1. 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.
  2. Split large documentation into sections, shown in a progress panel and a grouped endpoint picker, so one failed section no longer loses the rest.
  3. 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.
  4. Followed JavaScript-only pages, including Swagger UI pages, to the spec file they load, and raised uploads to 25 MB.
  5. Made the crawler follow rel="next" links, Docusaurus pagination, and ?page=2 lists within the same folder, up to 100 pages.
  6. Listed POST endpoints from specs, each with its method and a body drawn from the spec.
  7. 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?

MeasureBeforeAfterTimeframe
Elexon BMRS spec, 1.5 MB"The given content is too large to process"All 326 GET endpoints listedLocal test, 10 November 2026
POST endpoints from a specGET onlyListed with method and body; 0 POST requests sent to a contacts APILocal test, November 2026
Crawler and spec parsingApproved 3 November 2026In production 19 November 202616 days
Importer screens (progress panel, grouped and POST pickers, 25 MB uploads)Approved 3 November 2026In production by 1 December 202628 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

Why does Maia's custom connector import say the content is too large to process?

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.

Can Maia build a custom connector from an OpenAPI or Swagger file?

Yes: link the spec or upload a spec file of up to 25 MB, and the import lists every GET endpoint, grouped by section.

Can the custom connector import add POST endpoints?

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.

Last updated
December 2, 2026

Featuring

Ben Bajek
Principal Forward Deployed Engineer, Matillion
We go after the problems that stop customers from getting value from their data, and we solve them so they stay solved: in the product, in shared tooling, or as context Maia and our teams can build on. My favourite engagements are the ones where fixing it for one customer quietly unlocks it for the next ten.

Data management
made effortless

Enjoy the freedom to do more with Maia on your side.
Abstract dark teal geometric shapes background with diagonal lines and subtle gradients.