Get started
Quickstart
Parse your first document, from your own code or from an AI agent.
You need an API key: create one in Studio, see Authentication. Then build in code, or let an AI agent do it for you.
In code
Section titled “In code”-
Install an SDK
Section titled “Install an SDK”Nothing to install: send the key in the
X-API-Keyheader.export BYTEIT_API_KEY="your-api-key"pip install byteitNot on npm yet: build it from the SDK repository.
git clone https://github.com/byteit-ai/byteit-sdk.git(cd byteit-sdk/typescript && pnpm install && pnpm build)npm install ./byteit-sdk/typescriptNot on NuGet yet: reference the project from the SDK repository.
dotnet add reference <path-to>/dotnet/src/ByteIt/ByteIt.csproj -
Parse a document
Section titled “Parse a document”Send the document, wait until the job is
completedorfailed, then download the result.# 1. Send the documentcurl -X POST https://byteit.ai/v1/jobs/parse-jobs/ \-H "X-API-Key: $BYTEIT_API_KEY" \-F "file=@invoice.pdf"# 2. Repeat until processing_status is completed or failedcurl https://byteit.ai/v1/jobs/$JOB_ID/status/ \-H "X-API-Key: $BYTEIT_API_KEY"# 3. Download the resultcurl https://byteit.ai/v1/jobs/$JOB_ID/result/ \-H "X-API-Key: $BYTEIT_API_KEY" \-o invoice.txtimport timefrom byteit import ByteItclient = ByteIt(api_key="YOUR_API_KEY")def wait_until_done(job_id: str) -> None:"""Poll the job until it is completed; raise if it failed."""status = client.jobs.get_status(id=job_id)while status.processing_status not in ("completed", "failed"):time.sleep(2)status = client.jobs.get_status(id=job_id)if status.processing_status == "failed":raise RuntimeError(f"Job {job_id} failed: {status.message}")# 1. Send the document.with open("invoice.pdf", "rb") as file:parse_job = client.parse_jobs.create(file=file).parse_job# 2. Wait for the job.wait_until_done(parse_job.job_id)# 3. Download the result (text by default; see `output_format`).text = b"".join(client.jobs.download_result(id=parse_job.job_id)).decode()print(text)import * as fs from "fs";import { ByteItClient } from "@byteit/sdk";const client = new ByteItClient({ apiKey: process.env.BYTEIT_API_KEY! });const { parse_job } = await client.parseJobs.create({ file: fs.createReadStream("invoice.pdf") });let status = await client.jobs.getStatus({ id: parse_job!.job_id });while (status.processing_status !== "completed" && status.processing_status !== "failed") {await new Promise((resolve) => setTimeout(resolve, 2000));status = await client.jobs.getStatus({ id: parse_job!.job_id });}if (status.processing_status === "failed") {throw new Error(`Job ${parse_job!.job_id} failed: ${status.message}`);}const result = await client.jobs.downloadResult({ id: parse_job!.job_id });const text = new TextDecoder().decode(await result.arrayBuffer());using ByteIt;var client = new ByteItClient("YOUR_API_KEY");var created = await client.ParseJobs.CreateAsync(new CreateParseJobRequest{File = new FileParameter { Stream = File.OpenRead("invoice.pdf"), FileName = "invoice.pdf" },});var jobId = created.ParseJob!.JobId;var status = await client.Jobs.GetStatusAsync(new GetStatusJobsRequest { Id = jobId });while (status.ProcessingStatus is not ("completed" or "failed")){await Task.Delay(TimeSpan.FromSeconds(2));status = await client.Jobs.GetStatusAsync(new GetStatusJobsRequest { Id = jobId });}if (status.ProcessingStatus == "failed"){throw new InvalidOperationException($"Job {jobId} failed: {status.Message}");}await using var result = await client.Jobs.DownloadResultAsync(new DownloadResultJobsRequest { Id = jobId });
With an AI agent
Section titled “With an AI agent”Connect the ByteIt MCP server and ask for what you need in plain words. The key is read
from BYTEIT_API_KEY.
claude mcp add --transport http byteit https://mcp.byteit.ai --header "Authorization: Bearer $BYTEIT_API_KEY"codex mcp add byteit --url https://mcp.byteit.ai --bearer-token-env-var BYTEIT_API_KEYgemini mcp add --transport http --header "Authorization: Bearer $BYTEIT_API_KEY" byteit https://mcp.byteit.aiNext steps
Section titled “Next steps”- Extract fields from the parsed document with your own schema.
- See every endpoint in the API reference.