Post method:
Next Steps
- Learn about parse configuration options
- Explore extract configuration options
- Use the REST API for direct access
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Run parse and extract in a single request using the Go SDK
/pipeline endpoint and pipeline SDK methods are deprecated. Call /parse, /extract, /split, or /edit directly instead.Post method:
package main
import (
"context"
"fmt"
"io"
"os"
reducto "github.com/reductoai/reducto-go-sdk"
"github.com/reductoai/reducto-go-sdk/option"
)
func main() {
client := reducto.NewClient(option.WithAPIKey(os.Getenv("REDUCTO_API_KEY")))
// Upload first
file, _ := os.Open("document.pdf")
defer file.Close()
upload, _ := client.Upload(context.Background(), reducto.UploadParams{
File: reducto.F[io.Reader](file),
})
// Prepare pipeline request
pipelineParams := map[string]interface{}{
"input": upload.FileID,
"pipeline_id": "your-pipeline-id-here",
}
var result map[string]interface{}
err := client.Post(context.Background(), "pipeline", pipelineParams, &result)
if err != nil {
fmt.Printf("Pipeline error: %v\n", err)
return
}
fmt.Printf("Result: %+v\n", result)
}
Was this page helpful?