Skip to main content

“Overleaf Import API” feature

Starting with Ayakaleaf Pro v6.3, you can create links that import a LaTeX file or a zipped project from a URL and open it in your own Ayakaleaf instance, similar to Overleaf’s “Open in Overleaf” API. This feature is enabled by default, you just need to visit your.overleaf.com/devs to see detailed page and instructions.
The /devs page requires a login unless OVERLEAF_ALLOW_PUBLIC_ACCESS=true, see #signed-out-visitors.
For example, if you host a LaTeX file at https://example.com/main.tex or a complete project at https://example.com/project.zip, you can create a link that imports it into your own Ayakaleaf Pro instance and opens the new project:
Replace ayakaleaf.example.com with your instance’s domain.

Open a LaTeX project in Ayakaleaf Pro

Starting with Ayakaleaf Pro v6.3, you can create a link that imports a LaTeX file or a zipped project into your own Ayakaleaf Pro instance. When someone opens the link, Ayakaleaf Pro creates a new project from the supplied file and opens it in the editor. Send the link to your instance’s /docs endpoint: For example, if your files are hosted on example.com, these links import them into an Ayakaleaf Pro instance hosted at ayakaleaf.example.com .

Import a project using Base64

You can embed a LaTeX file or a zipped project directly in an “Open in Ayakaleaf” link as a Base64 data URL. This lets you create an import link without hosting the file at a separate URL. To import a ZIP project, Base64-encode the ZIP file and pass it through zip_uri instead. Use encodeURIComponent on the complete data URL when constructing either link. For large projects, use a hosted ZIP URL because browser and server URL-length limits can make Base64 links impractical.

Add an “Open in Ayakaleaf” button

You can use an HTML form to import a file when a visitor clicks a button. Submit the form to your instance’s /docs endpoint with method="post". For a hosted LaTeX file:
To import a zipped project, replace snip_uri with zip_uri and point it to the ZIP file. You can also submit LaTeX source directly using snip for raw text or encoded_snip for URL-encoded text. Replace ayakaleaf.example.com with your instance’s domain. If your instance enables cross-origin request blocking, add the website hosting the form to ALLOWED_ORIGINS.

Signed-out visitors

The new project is created in the visitor’s account, so they need to log in. How a signed-out visitor gets there depends on how the import is sent:
  • Links (GET /docs?...) work on every instance: the visitor is sent to the login page and the import continues after logging in.
  • Forms (POST /docs) need OVERLEAF_ALLOW_PUBLIC_ACCESS=true for signed-out visitors. The submission is then kept for 10 minutes until the visitor has logged in, and used once.
By default (OVERLEAF_ALLOW_PUBLIC_ACCESS not set), a form submitted by a signed-out visitor is sent to the login page before Ayakaleaf Pro reads it, and the submission is lost: after logging in, the visitor sees no snippet, snip_uri or zip_uri provided. Use links, ask visitors to log in first, or enable public access, see #page-access.
Ayakaleaf Pro uses the linked-url-proxy microservice (mainly used for external-url.md) to fetch external resources. In general, any publicly accessible ZIP or TeX resource available over the Internet can be imported. Resources hosted on private or internal networks are blocked for security reasons.Starting with the re-released Ayakaleaf Pro 6.3.0 (October 3, 2026), you can configure an HTTP(S) proxy for fetching external ZIP and TeX resources with OVERLEAF_LINKED_URL_OUTBOUND_PROXY. See #outbound-proxy for configuration and network access restrictions.
Last modified on October 6, 2026