langchain-converter-studio
LangChain tools for Converter Studio: an agent can convert files and links to other formats, read the text of scanned PDFs and photos with OCR, make PDFs smaller and look up what a file can become. The work runs on Converter Studio's servers through its API, so there is nothing else to install: no LibreOffice, no FFmpeg, no Tesseract.
| Tool | Name | What the agent gets back |
|---|---|---|
ConverterStudioConvert |
converter_studio_convert |
the new file's download link, and the file in the working directory |
ConverterStudioExtractText |
converter_studio_extract_text |
the recognised text of a scanned PDF or a picture (JPG, PNG, WebP, HEIC...) |
ConverterStudioCompressPdf |
converter_studio_compress_pdf |
the sizes before and after, the smaller PDF's link and file |
ConverterStudioListFormats |
converter_studio_list_formats |
what a format, extension or file name can become (free, no key) |
ConverterStudioToolkit gives an agent all four, with one set of settings.
Converter Studio reads documents (Word, PDF, ODT, RTF, Markdown, HTML), spreadsheets, presentations, images and iPhone photos (HEIC, camera RAW, WebP, AVIF), video, audio, e-books, subtitles, fonts, data files and archives: 67 formats.
Installation
$ pip install -U langchain-converter-studio
Python 3.11 or later and langchain-core 1.4 or later. The package uses the official
Converter Studio Python client
(converter-studio), which pip installs with it.
Create an API key on your account page (keys start
with cvs_live_; a free account works) and put it in the environment:
$ export CONVERTER_STUDIO_API_KEY=cvs_live_...
Every conversion uses the account's credits, the same as on the website: free accounts get credits every day, Pro and Premium their monthly credits. Most files cost 1 credit; text recognition costs a credit for every ten PDF pages started; audio and video are priced by their length (video also by its frame size and the format made). See pricing. Listing formats is free.
Quick start
from langchain_converter_studio import ConverterStudioConvert
tool = ConverterStudioConvert(root_dir="documents")
print(tool.invoke({"source": "report.docx", "to": "pdf"}))
Converted report.docx (DOCX) to PDF: report.pdf, 52.1 KB, 1 credit.
Saved in the working directory as report.pdf.
Download link (anyone with it can download the file until 2026-11-23 08:00 UTC): https://converter.studio/api/jobs/...
Use it in an agent
The toolkit gives the agent all four tools. This example runs as it is, without a model provider's
key: ScriptedModel plays back the tool calls a model would make. It needs pip install langchain
for create_agent, a documents folder with a report.docx in it, and your Converter Studio key
in CONVERTER_STUDIO_API_KEY.
from langchain.agents import create_agent
from langchain_core.language_models.fake_chat_models import GenericFakeChatModel
from langchain_core.messages import AIMessage
from langchain_converter_studio import ConverterStudioToolkit
class ScriptedModel(GenericFakeChatModel):
"""Plays back the messages below instead of calling a model."""
def bind_tools(self, tools, **kwargs):
return self
def tool_call(call_id, name, **args):
return AIMessage("", tool_calls=[{"id": call_id, "name": name, "args": args}])
model = ScriptedModel(
messages=iter(
[
tool_call("1", "converter_studio_list_formats", file_format="report.docx"),
tool_call("2", "converter_studio_convert", source="report.docx", to="pdf"),
AIMessage("report.pdf is in the documents folder."),
]
)
)
toolkit = ConverterStudioToolkit(root_dir="documents", max_credits=5)
agent = create_agent(model, tools=toolkit.get_tools())
result = agent.invoke({"messages": [{"role": "user", "content": "Make a PDF of report.docx"}]})
for message in result["messages"]:
message.pretty_print()
With a real model, pass any chat model that supports tool calling instead of model, for example
create_agent("<provider>:<model>", tools=toolkit.get_tools()). The tools' descriptions and
argument schemas tell the model what each one does.
The working directory
root_dir is the folder the tools work in:
- With it, the agent can name local files by their path inside that folder
(
"report.docx","scans/invoice.pdf"), and every result is saved there under its own name. A result never replaces a file: it gets-1,-2... before its extension. Paths that lead out of the folder (../, absolute paths elsewhere, symbolic links pointing outside) are refused, so a model's argument never sends other files on the machine to Converter Studio. - Without it, the tools read no local files: they take
http://andhttps://links only (direct links and Google Drive, Dropbox or OneDrive share links), and give back download links.
Settings
The toolkit takes all of these keyword arguments, and each tool the ones that apply to it:
| Setting | Default | What it does |
|---|---|---|
api_key |
CONVERTER_STUDIO_API_KEY |
the account's API key (not needed by ConverterStudioListFormats) |
root_dir |
none | the working directory (above) |
max_credits |
20 |
the most one conversion may cost; a dearer one is refused and costs nothing. The model cannot change it |
timeout |
600 |
seconds to wait for a conversion to finish |
max_characters |
20000 |
the most characters of recognised text returned to the model (ConverterStudioExtractText) |
base_url |
CONVERTER_STUDIO_BASE_URL or https://converter.studio/api |
another address of the API |
handle_tool_error |
True |
tools only: errors go back to the model as the tool's answer; False raises ToolException |
What the tools return
Called with a model's tool call (as an agent calls them), the conversion tools return a
ToolMessage whose content is the text above and whose artifact holds the conversion as a
dict, for your own code:
message = tool.invoke(
{
"args": {"source": "report.docx", "to": "pdf"},
"id": "1",
"name": tool.name,
"type": "tool_call",
}
)
message.artifact["download_url"], message.artifact["saved_path"], message.artifact["credits"]
The artifact has conversion_id, status, from_format, to_format, input_name,
input_size, output_name, output_size, credits, download_url, expires_at and
saved_path; ConverterStudioExtractText adds text, the whole text even when the message shows
only its start.
The conversion tool's arguments are source, to (pdf, docx, jpg, mp4, mp3...) and
optional options: the API's conversion settings, such as {"quality": "high"},
{"height": "720"} for video, {"maxKb": 200} for a JPG under a size, {"pageRange": "1-3"},
{"pdfA": true} or {"keepMetadata": true}. The full list is on the
API page; settings that do not apply are ignored.
ConverterStudioExtractText takes source, language (auto, en, de, fr, es, tr,
zh, ja... 19 languages) and page_range; ConverterStudioCompressPdf takes source and
level (light, balanced, strong).
Errors
Errors come back to the model as the tool's answer (status="error"), in words it can act on or
pass on: the API's own message for a key that does not work, a lack of credits, a file that
cannot be converted ("Your credits were given back") or a format that cannot become another, and
the tool's message for a price over max_credits, a conversion that took longer than timeout, a
path outside the working directory or a setting with the wrong type. The API key is never part of
an answer.
Async
Every tool works with ainvoke and in async agents (agent.ainvoke(...)), with the client's
asynchronous version underneath.
Limits
- The largest file and the longest audio or video depend on the plan. Results are kept for 6 hours, then deleted.
- One file in, one file out: no merging or splitting of PDFs.
- Anyone with a download link can download the result until it expires. When an agent run is traced (LangSmith, logs), the links in the tools' answers are traced with it.
Privacy
The files the tools are given are sent to Converter Studio (converter.studio) to be converted.
Uploaded files are deleted as soon as they are converted, and results 6 hours later. Each request
also says which integration sent it (X-Converter-Studio-Client: langchain/<version>), for usage
statistics only. See the privacy policy and the
terms.
Development
$ pip install -e . --group dev
$ pytest --disable-socket --allow-unix-socket tests/unit_tests
$ CONVERTER_STUDIO_API_KEY=cvs_live_... pytest tests/integration_tests
The unit tests run LangChain's standard tool tests (langchain-tests) and the tools inside
create_agent against a fake API, without network. The integration tests run LangChain's
standard integration tests against the real API and use 12 credits.
Links
- Converter Studio: https://converter.studio
- API documentation: https://converter.studio/developers
- Pricing: https://converter.studio/pricing
- Source code and issues: https://github.com/tariksucu/langchain-converter-studio
- Changelog: https://github.com/tariksucu/langchain-converter-studio/blob/main/CHANGELOG.md
- Support: support@converter.studio
MIT licensed. © Converter Studio.
Metadata
Release files for langchain-converter-studio 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| langchain_converter_studio-1.0.0.tar.gz | 44.9 kB | With provenance | Details for langchain_converter_studio-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| langchain_converter_studio-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for langchain_converter_studio-1.0.0-py3-none-any.whl |
Total release size: 64.3 kB
Release files / langchain_converter_studio-1.0.0.tar.gz
| Download URL | langchain_converter_studio-1.0.0.tar.gz |
|---|---|
| Size | 44.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5790570f0ebefb6a35a1578386c28fde882698b6c42c9c94368200d42987e4de
|
|
BLAKE2b-256 checksum How to use checksums |
cf02aaf4dc0c72d839b3204a24f7e51a48be30d6a60aa54315ea77255897b9ee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.
Transparency logRelease files / langchain_converter_studio-1.0.0-py3-none-any.whl
| Download URL | langchain_converter_studio-1.0.0-py3-none-any.whl |
|---|---|
| Size | 19.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
18667556a5f8f1b56680cab33bfe4e4675cdbcb25cdbad7fe806d96548d6f3b1
|
|
BLAKE2b-256 checksum How to use checksums |
cddfbb6b16f6f38cd7791909e86f69624adf125ed31cb10bf8aa6c5c2f7455c7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.
Transparency logSecurity for langchain-converter-studio 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for langchain_converter_studio-1.0.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.