Velocity API PRO PDF

Hello, I have acquired a PRO PDF license and I am testing with the new KEY API that I received by email and I verify that the response time is similar to that previously obtained with the KEY Free API, both in PDF and JPG. I copy the C # code that I use in case there is an error that I am not contemplating.
Thank you

Hi… I am not sure I understand what is the question? So your app worked with the free key but not the PRO key? The api reponse is 100% identical in both cases (same format etc).

Sorry for my English. What I mean is that the response speed of the api free and the api pro pdf for the same document is identical. As I saw on the web theoretically, the response of api pro pdf should be much faster.

The code is:

Blockquote



for (int i = 0; i < dlg.FileNames.Count(); i++)
{
listOcrResult = new List<OcrSpaceResult.RootObject>();
HttpClient httpClient = new HttpClient();
httpClient.Timeout = new TimeSpan(1, 1, 1);
MultipartFormDataContent form = new MultipartFormDataContent();
string path = dlg.FileNames[i];
byte[] imageData = File.ReadAllBytes(path);
System.IO.FileInfo f = new FileInfo(path);
string engine = “1”;
if (f.Extension.ToUpper() == “.PDF”)
{
form.Add(new ByteArrayContent(imageData, 0, imageData.Length), “PDF”, “pdf.pdf”);
}
else
{
form.Add(new ByteArrayContent(imageData, 0, imageData.Length), “image”, “image.jpg”);
engine = “2”;
}
form.Add(new StringContent(“XXXXXXXXXX”), “apikey”);
form.Add(new StringContent(“spa”), “language”);
form.Add(new StringContent(engine), “OCREngine”);
form.Add(new StringContent(“true”), “scale”);
form.Add(new StringContent(“true”), “detectOrientation”);
form.Add(new StringContent(“true”), “isTable”);
using (HttpResponseMessage response = await httpClient.PostAsync(“https://apipro1.ocr.space/parse/image”, form))
{
string strContent = await response.Content.ReadAsStringAsync();
ocrResult = JsonConvert.DeserializeObject<OcrSpaceResult.RootObject>(strContent);
listOcrResult.Add(ocrResult);
}

Blockquote

The API response format is the same, but usually the PRO API is faster then free. Did you select the endpoint that is closest to you? E. g. European endpoint or Asia endpoint?

Yes, I tried with the closest one, Europe, and with the other two, but the resolution time is the same as when I use a free apikey. I do not know if my code is not suitable, but it is strange that both apikey take the same.
Could you check if my code is correct? Please, I’m pretty restless about this.

Your code looks good to me. What I find is that the free api point is sometimes fast and sometimes slow, but the PRO api point is always fast. So I think you just tested during a time of low load for the free api point.

Also, you can use the free api point with the PRO key. Then you get all benefits of the PRO or PRO PDF plan. It is the api key that decides the number of conversions, not the endpoint.