Skip to main content
The Parse.Run() method turns full documents into LLM-ready content: text, tables, figures, layout, and formatting. r-1 is the main Parse model (see Parse r-1). Parse returns content organized into chunks for LLM and RAG workflows.
The Go SDK examples on this page use V2 configuration names. r-1 and r-1 mini are not available through the V2 API, so these requests use legacy Parse. To use r-1 or r-1 mini, convert the request to the V3 API. Review Parse r-1 and r-1 configuration compatibility before moving an existing configuration.

Basic Usage


Method Signatures

Synchronous Parse

Asynchronous Parse

The RunJob method returns a JobID that you can use with client.Job.Get() to retrieve results.

Input Options

The DocumentURL parameter accepts several formats:

Configuration Examples

Chunking

By default, Parse returns the entire document as one chunk. For RAG applications, use variable chunking:

Table Output Format

Control how tables appear in the output:

Page Range

Process only specific pages:

Filter Blocks

Remove specific content types from output:

Asynchronous Processing

For long-running operations, use Parse.RunJob() to submit a job and poll for results:

Response Structure


Union Types

The Go SDK uses union types for responses that can have different structures. The ParseResponseResult can be either a ParseResponseResultFullResult (inline content) or a ParseResponseResultURLResult (URL to fetch content). Always check the Type field first, then use AsUnion() to cast to the specific type:

Error Handling


Next Steps