Idiomatic Go client for screaming fast goroutine-powered batch OCR requests.
import "github.com/solveocr/solveocr-go"
fn main() {
client := solveocr.NewClient("sk-your-secret-key")
}Easily pass local files to the synchronous extraction endpoint.
res, err := client.ExtractFile("receipt.pdf")
if err != nil {
log.Fatal(err)
}
fmt.Printf("Total Confidence: %v\n", res.Confidence)
fmt.Printf("Text: %v\n", res.Text)The Go SDK utilizes optimized pipelining under the hood for parallel batch processing.
paths := []string{"doc1.png", "doc2.png", "doc3.jpeg"}
batchRes, _ := client.ExtractBatchAsync(context.Background(), paths)
for _, doc := range batchRes.Results {
fmt.Println(doc.Text)
}