درگاه احراز هویت آنلاین

مشاهده سرویس ها

سرویس های هوش مصنوعی

مشاهده سرویس ها

سرویس های استعلامی

مشاهده سرویس ها

سرویس های احراز هویت

مشاهده سرویس ها

صدور امضا دیجیتال

مشاهده سرویس ها

استعلام اطلاعات شرکت

مشاهده سرویس ها

سرویس نئوبانک

مشاهده سرویس ها

سجام آنلاین

بزودی

شارژ و بسته اینترنتی

بزودی

کارگر و کارفرما

بزودی

قوه قضائیه هوشمند

بزودی

سرویس دریافت توکن



برای فراخوانی این سرویس مراحل زیر را طی کنید:
۱-متد فراخوانی سرویس POST می باشد.


  https://api.itsaaz.ir/identity/token
        

  Post
        

  Content-Type: application/x-www-form-urlencoded
        

  grant_type= "password" 
  client_id= "ekyc"
  Client_secret= "f63026a9-912d-8978-ac80-4ae5d63db1ac" 
  username= "test"
  password= "t_86574213@T"
        

  {
    "access_token": "توکن",
    "expires_in": مدت استفاده,
    "token_type": "نوع توکن",
    "refresh_token": "رفرش توکن",
    "scope": "محدوده"
  }      
        

پارامترهای ورودی

ردیف پارامتر ورودی نوع ورودی توضیحات
1 Grant_type String
2 Client_id String
3 Client_secret String
4 username String
4 password String

نمونه کد


  var client = new RestClient("https://api.itsaaz.ir/identity/token");
  client.Timeout = -1;
  var request = new RestRequest(Method.POST);
  request.AddHeader("Content-Type", "application/x-www-form-urlencoded");
  request.AddParameter("grant_type", "password");
  request.AddParameter("client_id", "test");
  request.AddParameter("Client_secret", "66c0af3a-ff89-8390-3b07-cf88a25e5f3f");
  request.AddParameter("username", "test");
  request.AddParameter("password", "t_86574213@H");
  IRestResponse response = client.Execute(request);
  Console.WriteLine(response.Content);
        

  curl --location --request POST 'https://api.itsaaz.ir/identity/token' \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --data-urlencode 'grant_type=password' \
  --data-urlencode 'client_id=test' \
  --data-urlencode 'Client_secret=66c0af3a-ff89-8390-3b07-cf88a25e5f3f' \
  --data-urlencode 'username=test' \
  --data-urlencode 'password=t_86574213@H'
        

  var headers = {
    'Content-Type': 'application/x-www-form-urlencoded'
  };
  var request = http.Request('POST', Uri.parse('https://api.itsaaz.ir/identity/token'));
  request.bodyFields = {
    'grant_type': 'password',
    'client_id': 'test',
    'Client_secret': '66c0af3a-ff89-8390-3b07-cf88a25e5f3f',
    'username': 'test',
    'password': 't_86574213@H'
  };
  request.headers.addAll(headers);
  
  http.StreamedResponse response = await request.send();
  
  if (response.statusCode == 200) {
    print(await response.stream.bytesToString());
  }
  else {
    print(response.reasonPhrase);
  }
          
        

  package main

  import (
    "fmt"
    "strings"
    "net/http"
    "io/ioutil"
  )
  
  func main() {
  
    url := "https://api.itsaaz.ir/identity/token"
    method := "POST"
  
    payload := strings.NewReader("grant_type=password&client_id=test&Client_secret=66c0af3a-ff89-8390-3b07-cf88a25e5f3f&username=test&password=t_86574213%40H")
  
    client := &http.Client {
    }
    req, err := http.NewRequest(method, url, payload)
  
    if err != nil {
      fmt.Println(err)
      return
    }
    req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
  
    res, err := client.Do(req)
    if err != nil {
      fmt.Println(err)
      return
    }
    defer res.Body.Close()
  
    body, err := ioutil.ReadAll(res.Body)
    if err != nil {
      fmt.Println(err)
      return
    }
    fmt.Println(string(body))
  }
        

  POST /identity/token HTTP/1.1
  Host: api.itsaaz.ir
  Content-Type: application/x-www-form-urlencoded
  Content-Length: 123
  
  grant_type=password&client_id=test&Client_secret=66c0af3a-ff89-8390-3b07-cf88a25e5f3f&username=test&password=t_86574213%40H
        

    OkHttpClient client = new OkHttpClient().newBuilder()
    .build();
  MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded");
  RequestBody body = RequestBody.create(mediaType, "grant_type=password&client_id=test&Client_secret=66c0af3a-ff89-8390-3b07-cf88a25e5f3f&username=test&password=t_86574213@H");
  Request request = new Request.Builder()
    .url("https://api.itsaaz.ir/identity/token")
    .method("POST", body)
    .addHeader("Content-Type", "application/x-www-form-urlencoded")
    .build();
  Response response = client.newCall(request).execute();

            

  Unirest.setTimeouts(0, 0);
  HttpResponse<String> response = Unirest.post("https://api.itsaaz.ir/identity/token")
    .header("Content-Type", "application/x-www-form-urlencoded")
    .field("grant_type", "password")
    .field("client_id", "test")
    .field("Client_secret", "66c0af3a-ff89-8390-3b07-cf88a25e5f3f")
    .field("username", "test")
    .field("password", "t_86574213@H")
    .asString();
  
  
            

  var myHeaders = new Headers();
  myHeaders.append("Content-Type", "application/x-www-form-urlencoded");
  
  var urlencoded = new URLSearchParams();
  urlencoded.append("grant_type", "password");
  urlencoded.append("client_id", "test");
  urlencoded.append("Client_secret", "66c0af3a-ff89-8390-3b07-cf88a25e5f3f");
  urlencoded.append("username", "test");
  urlencoded.append("password", "t_86574213@H");
  
  var requestOptions = {
    method: 'POST',
    headers: myHeaders,
    body: urlencoded,
    redirect: 'follow'
  };
  
  fetch("https://api.itsaaz.ir/identity/token", requestOptions)
    .then(response => response.text())
    .then(result => console.log(result))
    .catch(error => console.log('error', error));
            

  var settings = {
    "url": "https://api.itsaaz.ir/identity/token",
    "method": "POST",
    "timeout": 0,
    "headers": {
      "Content-Type": "application/x-www-form-urlencoded"
    },
    "data": {
      "grant_type": "password",
      "client_id": "test",
      "Client_secret": "66c0af3a-ff89-8390-3b07-cf88a25e5f3f",
      "username": "test",
      "password": "t_86574213@H"
    }
  };

  $.ajax(settings).done(function (response) {
    console.log(response);
  });
            

  var data = "grant_type=password&client_id=test&Client_secret=66c0af3a-ff89-8390-3b07-cf88a25e5f3f&username=test&password=t_86574213%40H";

  var xhr = new XMLHttpRequest();
  xhr.withCredentials = true;
  
  xhr.addEventListener("readystatechange", function() {
    if(this.readyState === 4) {
      console.log(this.responseText);
    }
  });
  
  xhr.open("POST", "https://api.itsaaz.ir/identity/token");
  xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
  
  xhr.send(data);
            

  CURL *curl;
  CURLcode res;
  curl = curl_easy_init();
  if(curl) {
    curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST");
    curl_easy_setopt(curl, CURLOPT_URL, "https://api.itsaaz.ir/identity/token");
    curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
    curl_easy_setopt(curl, CURLOPT_DEFAULT_PROTOCOL, "https");
    struct curl_slist *headers = NULL;
    headers = curl_slist_append(headers, "Content-Type: application/x-www-form-urlencoded");
    curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
    const char *data = "grant_type=password&client_id=test&Client_secret=66c0af3a-ff89-8390-3b07-cf88a25e5f3f&username=test&password=t_86574213%40H";
    curl_easy_setopt(curl, CURLOPT_POSTFIELDS, data);
    res = curl_easy_perform(curl);
  }
  curl_easy_cleanup(curl);
  

        

  var axios = require('axios');
  var qs = require('qs');
  var data = qs.stringify({
    'grant_type': 'password',
    'client_id': 'test',
    'Client_secret': '66c0af3a-ff89-8390-3b07-cf88a25e5f3f',
    'username': 'test',
    'password': 't_86574213@H' 
  });
  var config = {
    method: 'post',
    url: 'https://api.itsaaz.ir/identity/token',
    headers: { 
      'Content-Type': 'application/x-www-form-urlencoded'
    },
    data : data
  };
  
  axios(config)
  .then(function (response) {
    console.log(JSON.stringify(response.data));
  })
  .catch(function (error) {
    console.log(error);
  });
  
  
            

  var https = require('follow-redirects').https;
  var fs = require('fs');
  
  var qs = require('querystring');
  
  var options = {
    'method': 'POST',
    'hostname': 'api.itsaaz.ir',
    'path': '/identity/token',
    'headers': {
      'Content-Type': 'application/x-www-form-urlencoded'
    },
    'maxRedirects': 20
  };
  
  var req = https.request(options, function (res) {
    var chunks = [];
  
    res.on("data", function (chunk) {
      chunks.push(chunk);
    });
  
    res.on("end", function (chunk) {
      var body = Buffer.concat(chunks);
      console.log(body.toString());
    });
  
    res.on("error", function (error) {
      console.error(error);
    });
  });
  
  var postData = qs.stringify({
    'grant_type': 'password',
    'client_id': 'test',
    'Client_secret': '66c0af3a-ff89-8390-3b07-cf88a25e5f3f',
    'username': 'test',
    'password': 't_86574213@H'
  });
  
  req.write(postData);
  
  req.end();
            

  var request = require('request');
  var options = {
    'method': 'POST',
    'url': 'https://api.itsaaz.ir/identity/token',
    'headers': {
      'Content-Type': 'application/x-www-form-urlencoded'
    },
    form: {
      'grant_type': 'password',
      'client_id': 'test',
      'Client_secret': '66c0af3a-ff89-8390-3b07-cf88a25e5f3f',
      'username': 'test',
      'password': 't_86574213@H'
    }
  };
  request(options, function (error, response) {
    if (error) throw new Error(error);
    console.log(response.body);
  });
  
  
            

  var unirest = require('unirest');
  var req = unirest('POST', 'https://api.itsaaz.ir/identity/token')
    .headers({
      'Content-Type': 'application/x-www-form-urlencoded'
    })
    .send('grant_type=password')
    .send('client_id=test')
    .send('Client_secret=66c0af3a-ff89-8390-3b07-cf88a25e5f3f')
    .send('username=test')
    .send('password=t_86574213@H')
    .end(function (res) { 
      if (res.error) throw new Error(res.error); 
      console.log(res.raw_body);
    });
  
  
            

  #import <Foundation/Foundation.h>

  dispatch_semaphore_t sema = dispatch_semaphore_create(0);
  
  NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://api.itsaaz.ir/identity/token"]
    cachePolicy:NSURLRequestUseProtocolCachePolicy
    timeoutInterval:10.0];
  NSDictionary *headers = @{
    @"Content-Type": @"application/x-www-form-urlencoded"
  };
  
  [request setAllHTTPHeaderFields:headers];
  NSMutableData *postData = [[NSMutableData alloc] initWithData:[@"grant_type=password" dataUsingEncoding:NSUTF8StringEncoding]];
  [postData appendData:[@"&client_id=test" dataUsingEncoding:NSUTF8StringEncoding]];
  [postData appendData:[@"&Client_secret=66c0af3a-ff89-8390-3b07-cf88a25e5f3f" dataUsingEncoding:NSUTF8StringEncoding]];
  [postData appendData:[@"&username=test" dataUsingEncoding:NSUTF8StringEncoding]];
  [postData appendData:[@"&password=t_86574213@H" dataUsingEncoding:NSUTF8StringEncoding]];
  [request setHTTPBody:postData];
  
  [request setHTTPMethod:@"POST"];
  
  NSURLSession *session = [NSURLSession sharedSession];
  NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
  completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
    if (error) {
      NSLog(@"%@", error);
      dispatch_semaphore_signal(sema);
    } else {
      NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
      NSError *parseError = nil;
      NSDictionary *responseDictionary = [NSJSONSerialization JSONObjectWithData:data options:0 error:&parseError];
      NSLog(@"%@",responseDictionary);
      dispatch_semaphore_signal(sema);
    }
  }];
  [dataTask resume];
  dispatch_semaphore_wait(sema, DISPATCH_TIME_FOREVER);     
        

  open Lwt
  open Cohttp
  open Cohttp_lwt_unix

  let postData = ref "grant_type=password&client_id=test&Client_secret=66c0af3a-ff89-8390-3b07-cf88a25e5f3f&username=test&password=t_86574213%40H";;
  
  let reqBody = 
    let uri = Uri.of_string "https://api.itsaaz.ir/identity/token" in
    let headers = Header.init ()
      |> fun h -> Header.add h "Content-Type" "application/x-www-form-urlencoded"
    in
    let body = Cohttp_lwt.Body.of_string !postData in
  
    Client.call ~headers ~body `POST uri >>= fun (_resp, body) ->
    body |> Cohttp_lwt.Body.to_string >|= fun body -> body
  
  let () =
    let respBody = Lwt_main.run reqBody in
    print_endline (respBody)
        

  <?php

  $curl = curl_init();
  
  curl_setopt_array($curl, array(
    CURLOPT_URL => 'https://api.itsaaz.ir/identity/token',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 0,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_POSTFIELDS => 'grant_type=password&client_id=test&Client_secret=66c0af3a-ff89-8390-3b07-cf88a25e5f3f&username=test&password=t_86574213%40H',
    CURLOPT_HTTPHEADER => array(
      'Content-Type: application/x-www-form-urlencoded'
    ),
  ));
  
  $response = curl_exec($curl);
  
  curl_close($curl);
  echo $response;
  
            

  <?php
  require_once 'HTTP/Request2.php';
  $request = new HTTP_Request2();
  $request->setUrl('https://api.itsaaz.ir/identity/token');
  $request->setMethod(HTTP_Request2::METHOD_POST);
  $request->setConfig(array(
    'follow_redirects' => TRUE
  ));
  $request->setHeader(array(
    'Content-Type' => 'application/x-www-form-urlencoded'
  ));
  $request->addPostParameter(array(
    'grant_type' => 'password',
    'client_id' => 'test',
    'Client_secret' => '66c0af3a-ff89-8390-3b07-cf88a25e5f3f',
    'username' => 'test',
    'password' => 't_86574213@H'
  ));
  try {
    $response = $request->send();
    if ($response->getStatus() == 200) {
      echo $response->getBody();
    }
    else {
      echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
      $response->getReasonPhrase();
    }
  }
  catch(HTTP_Request2_Exception $e) {
    echo 'Error: ' . $e->getMessage();
  }
            

  <?php
  $client = new http\Client;
  $request = new http\Client\Request;
  $request->setRequestUrl('https://api.itsaaz.ir/identity/token');
  $request->setRequestMethod('POST');
  $body = new http\Message\Body;
  $body->append(new http\QueryString(array(
    'grant_type' => 'password',
    'client_id' => 'test',
    'Client_secret' => '66c0af3a-ff89-8390-3b07-cf88a25e5f3f',
    'username' => 'test',
    'password' => 't_86574213@H')));$request->setBody($body);
  $request->setOptions(array());
  $request->setHeaders(array(
    'Content-Type' => 'application/x-www-form-urlencoded'
  ));
  $client->enqueue($request)->send();
  $response = $client->getResponse();
  echo $response->getBody();
  
            

  $headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
  $headers.Add("Content-Type", "application/x-www-form-urlencoded")

  $body = "grant_type=password&client_id=test&Client_secret=66c0af3a-ff89-8390-3b07-cf88a25e5f3f&username=test&password=t_86574213%40H"

  $response = Invoke-RestMethod 'https://api.itsaaz.ir/identity/token' -Method 'POST' -Headers $headers -Body $body
  $response | ConvertTo-Json
        

  import http.client

  conn = http.client.HTTPSConnection("api.itsaaz.ir")
  payload = 'grant_type=password&client_id=test&Client_secret=66c0af3a-ff89-8390-3b07-cf88a25e5f3f&username=test&password=t_86574213%40H'
  headers = {
    'Content-Type': 'application/x-www-form-urlencoded'
  }
  conn.request("POST", "/identity/token", payload, headers)
  res = conn.getresponse()
  data = res.read()
  print(data.decode("utf-8"))
            

  import requests

  url = "https://api.itsaaz.ir/identity/token"

  payload='grant_type=password&client_id=test&Client_secret=66c0af3a-ff89-8390-3b07-cf88a25e5f3f&username=test&password=t_86574213%40H'
  headers = {
    'Content-Type': 'application/x-www-form-urlencoded'
  }

  response = requests.request("POST", url, headers=headers, data=payload)

  print(response.text)

            

  require "uri"
  require "net/http"

  url = URI("https://api.itsaaz.ir/identity/token")

  https = Net::HTTP.new(url.host, url.port)
  https.use_ssl = true

  request = Net::HTTP::Post.new(url)
  request["Content-Type"] = "application/x-www-form-urlencoded"
  request.body = "grant_type=password&client_id=test&Client_secret=66c0af3a-ff89-8390-3b07-cf88a25e5f3f&username=test&password=t_86574213%40H"

  response = https.request(request)
  puts response.read_body
      
        

  http --ignore-stdin --form --follow --timeout 3600 POST 'https://api.itsaaz.ir/identity/token' \
  'grant_type'='password' \
  'client_id'='test' \
  'Client_secret'='66c0af3a-ff89-8390-3b07-cf88a25e5f3f' \
  'username'='test' \
  'password'='t_86574213@H' \
  Content-Type:'application/x-www-form-urlencoded'
            

  wget --no-check-certificate --quiet \
    --method POST \
    --timeout=0 \
    --header 'Content-Type: application/x-www-form-urlencoded' \
    --body-data 'grant_type=password&client_id=test&Client_secret=66c0af3a-ff89-8390-3b07-cf88a25e5f3f&username=test&password=t_86574213%40H' \
    'https://api.itsaaz.ir/identity/token'
            

  import Foundation
  #if canImport(FoundationNetworking)
  import FoundationNetworking
  #endif

  var semaphore = DispatchSemaphore (value: 0)

  let parameters = "grant_type=password&client_id=test&Client_secret=66c0af3a-ff89-8390-3b07-cf88a25e5f3f&username=test&password=t_86574213%40H"
  let postData =  parameters.data(using: .utf8)

  var request = URLRequest(url: URL(string: "https://api.itsaaz.ir/identity/token")!,timeoutInterval: Double.infinity)
  request.addValue("application/x-www-form-urlencoded", forHTTPHeaderField: "Content-Type")

  request.httpMethod = "POST"
  request.httpBody = postData

  let task = URLSession.shared.dataTask(with: request) { data, response, error in 
    guard let data = data else {
      print(String(describing: error))
      semaphore.signal()
      return
    }
    print(String(data: data, encoding: .utf8)!)
    semaphore.signal()
  }

  task.resume()
  semaphore.wait()
      
        


سرویس پردازش مشابهت دو تصویر:



۱-متد فراخوانی سرویس POST می باشد.
2- پس از فراخوانی سرویس، اطلاعات کاربر مطابق آنچه در جدول پارامتر های خروجی نمایش داده شده است، ارسال می شود.


  https://api.itsaaz.ir/ai/facesimilarity
        

      

  Post
        
      

  accept: application/json
  Authorization: Bearer YOUR-TOKEN
  Content-Type: multipart/form-data
        
      

  Face1Image=@"/C:/Users/itsaaz/Downloads/card-0370362063.jpeg"
  Face2Image=@"/C:/Users/itsaaz/Downloads/WhatsApp Image 2021-11-20 at 19.03.33.jpeg"
        
      

  {
    "data": {
      "cosine_Similarity": "زاویه مشابهت",
      "is_Verified": وضعیت تایید,
      "similarity": "درصد مشابهت",
      "success": وضعیت احراز
    },
    "meta": null,
    "error": null
  }
        
      

پارامترهای ورودی

ردیف پارامتر ورودی نوع ورودی توضیحات
1 Face1Image File تصویر اول چهره
2 Face2Image File تصویر دوم چهره

پارامترهای خروجی

ردیف پارامتر خروجی نوع خروجی توضیحات
1 cosine_Similarity string فاصله کسینوسی شباهت
2 is_Verified bool وضعیت تایید
3 similarity string درصد مشابهت
4 success string وضعیت احراز

نمونه کد


  var client = new RestClient("https://api.itsaaz.ir/ai/facesimilarity");
  client.Timeout = -1;
  var request = new RestRequest(Method.POST);
  request.AddHeader("accept", "application/json");
  request.AddHeader("Authorization", "Bearer YOUR-TOKEN");
  request.AddHeader("Content-Type", "multipart/form-data");
  request.AddParameter("ClientId", "");
  request.AddParameter("SecretKey", "");
  request.AddFile("Face1Image", "/C:/Users/itsaaz/Downloads/card-0370362063.jpeg");
  request.AddFile("Face2Image", "/C:/Users/itsaaz/Downloads/WhatsApp Image 2021-11-20 at 19.03.33.jpeg");
  IRestResponse response = client.Execute(request);
  Console.WriteLine(response.Content);
        

  curl --location --request POST 'https://api.itsaaz.ir/ai/facesimilarity' \
  --header 'accept: application/json' \
  --header 'Authorization: Bearer YOUR-TOKEN' \
  --header 'Content-Type: multipart/form-data' \
  --form 'ClientId=""' \
  --form 'SecretKey=""' \
  --form 'Face1Image=@"/C:/Users/itsaaz/Downloads/card-0370362063.jpeg"' \
  --form 'Face2Image=@"/C:/Users/itsaaz/Downloads/WhatsApp Image 2021-11-20 at 19.03.33.jpeg"'
        

  var headers = {
    'accept': 'application/json',
    'Authorization': 'Bearer YOUR-TOKEN',
    'Content-Type': 'multipart/form-data'
  };
  var request = http.MultipartRequest('POST', Uri.parse('https://api.itsaaz.ir/ai/facesimilarity'));
  request.fields.addAll({
    'ClientId': '',
    'SecretKey': ''
  });
  request.files.add(await http.MultipartFile.fromPath('Face1Image', '/C:/Users/itsaaz/Downloads/card-0370362063.jpeg'));
  request.files.add(await http.MultipartFile.fromPath('Face2Image', '/C:/Users/itsaaz/Downloads/WhatsApp Image 2021-11-20 at 19.03.33.jpeg'));
  request.headers.addAll(headers);
  
  http.StreamedResponse response = await request.send();
  
  if (response.statusCode == 200) {
    print(await response.stream.bytesToString());
  }
  else {
    print(response.reasonPhrase);
  }
  
        

  package main

  import (
    "fmt"
    "bytes"
    "mime/multipart"
    "os"
    "path/filepath"
    "io"
    "net/http"
    "io/ioutil"
  )
  
  func main() {
  
    url := "https://api.itsaaz.ir/ai/facesimilarity"
    method := "POST"
  
    payload := &bytes.Buffer{}
    writer := multipart.NewWriter(payload)
    _ = writer.WriteField("ClientId", "")
    _ = writer.WriteField("SecretKey", "")
    file, errFile3 := os.Open("/C:/Users/itsaaz/Downloads/card-0370362063.jpeg")
    defer file.Close()
    part3,
           errFile3 := writer.CreateFormFile("Face1Image",filepath.Base("/C:/Users/itsaaz/Downloads/card-0370362063.jpeg"))
    _, errFile3 = io.Copy(part3, file)
    if errFile3 != nil {
      fmt.Println(errFile3)
      return
    }
    file, errFile4 := os.Open("/C:/Users/itsaaz/Downloads/WhatsApp Image 2021-11-20 at 19.03.33.jpeg")
    defer file.Close()
    part4,
           errFile4 := writer.CreateFormFile("Face2Image",filepath.Base("/C:/Users/itsaaz/Downloads/WhatsApp Image 2021-11-20 at 19.03.33.jpeg"))
    _, errFile4 = io.Copy(part4, file)
    if errFile4 != nil {
      fmt.Println(errFile4)
      return
    }
    err := writer.Close()
    if err != nil {
      fmt.Println(err)
      return
    }
  
  
    client := &http.Client {
    }
    req, err := http.NewRequest(method, url, payload)
  
    if err != nil {
      fmt.Println(err)
      return
    }
    req.Header.Add("accept", "application/json")
    req.Header.Add("Authorization", "Bearer YOUR-TOKEN")
    req.Header.Add("Content-Type", "multipart/form-data")
  
    req.Header.Set("Content-Type", writer.FormDataContentType())
    res, err := client.Do(req)
    if err != nil {
      fmt.Println(err)
      return
    }
    defer res.Body.Close()
  
    body, err := ioutil.ReadAll(res.Body)
    if err != nil {
      fmt.Println(err)
      return
    }
    fmt.Println(string(body))
  }
        

  POST /ai/facesimilarity HTTP/1.1
  Host: api.itsaaz.ir
  accept: application/json
  Authorization: Bearer YOUR-TOKEN
  Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW
  Content-Length: 561
  
  ----WebKitFormBoundary7MA4YWxkTrZu0gW
  Content-Disposition: form-data; name="ClientId"
  
  
  ----WebKitFormBoundary7MA4YWxkTrZu0gW
  Content-Disposition: form-data; name="SecretKey"
  
  
  ----WebKitFormBoundary7MA4YWxkTrZu0gW
  Content-Disposition: form-data; name="Face1Image"; filename="card-0370362063.jpeg"
  Content-Type: image/jpeg
  
  (data)
  ----WebKitFormBoundary7MA4YWxkTrZu0gW
  Content-Disposition: form-data; name="Face2Image"; filename="WhatsApp Image 2021-11-20 at 19.03.33.jpeg"
  Content-Type: <Content-type header here>
  
  (data)
  ----WebKitFormBoundary7MA4YWxkTrZu0gW
  
        

    OkHttpClient client = new OkHttpClient().newBuilder()
    .build();
  MediaType mediaType = MediaType.parse("multipart/form-data");
  RequestBody body = new MultipartBody.Builder().setType(MultipartBody.FORM)
    .addFormDataPart("ClientId","")
    .addFormDataPart("SecretKey","")
    .addFormDataPart("Face1Image","card-0370362063.jpeg",
      RequestBody.create(MediaType.parse("application/octet-stream"),
      new File("/C:/Users/itsaaz/Downloads/card-0370362063.jpeg")))
    .addFormDataPart("Face2Image","WhatsApp Image 2021-11-20 at 19.03.33.jpeg",
      RequestBody.create(MediaType.parse("application/octet-stream"),
      new File("/C:/Users/itsaaz/Downloads/WhatsApp Image 2021-11-20 at 19.03.33.jpeg")))
    .build();
  Request request = new Request.Builder()
    .url("https://api.itsaaz.ir/ai/facesimilarity")
    .method("POST", body)
    .addHeader("accept", "application/json")
    .addHeader("Authorization", "Bearer YOUR-TOKEN")
    .addHeader("Content-Type", "multipart/form-data")
    .build();
  Response response = client.newCall(request).execute();
            

  Unirest.setTimeouts(0, 0);
  HttpResponse<String> response = Unirest.post("https://api.itsaaz.ir/ai/facesimilarity")
    .header("accept", "application/json")
    .header("Authorization", "Bearer YOUR-TOKEN")
    .header("Content-Type", "multipart/form-data")
    .field("ClientId", "")
    .field("SecretKey", "")
    .field("file", new File("/C:/Users/itsaaz/Downloads/card-0370362063.jpeg"))
    .field("file", new File("/C:/Users/itsaaz/Downloads/WhatsApp Image 2021-11-20 at 19.03.33.jpeg"))
    .asString();
  
            

  var myHeaders = new Headers();
  myHeaders.append("accept", "application/json");
  myHeaders.append("Authorization", "Bearer YOUR-TOKEN");
  myHeaders.append("Content-Type", "multipart/form-data");
  
  var formdata = new FormData();
  formdata.append("ClientId", "");
  formdata.append("SecretKey", "");
  formdata.append("Face1Image", fileInput.files[0], "card-0370362063.jpeg");
  formdata.append("Face2Image", fileInput.files[0], "WhatsApp Image 2021-11-20 at 19.03.33.jpeg");
  
  var requestOptions = {
    method: 'POST',
    headers: myHeaders,
    body: formdata,
    redirect: 'follow'
  };
  
  fetch("https://api.itsaaz.ir/ai/facesimilarity", requestOptions)
    .then(response => response.text())
    .then(result => console.log(result))
    .catch(error => console.log('error', error));
            

  var form = new FormData();
  form.append("ClientId", "");
  form.append("SecretKey", "");
  form.append("Face1Image", fileInput.files[0], "card-0370362063.jpeg");
  form.append("Face2Image", fileInput.files[0], "WhatsApp Image 2021-11-20 at 19.03.33.jpeg");
  
  var settings = {
    "url": "https://api.itsaaz.ir/ai/facesimilarity",
    "method": "POST",
    "timeout": 0,
    "headers": {
      "accept": "application/json",
      "Authorization": "Bearer YOUR-TOKEN",
      "Content-Type": "multipart/form-data"
    },
    "processData": false,
    "mimeType": "multipart/form-data",
    "contentType": false,
    "data": form
  };
  
  $.ajax(settings).done(function (response) {
    console.log(response);
  });
            

  var data = new FormData();
  data.append("ClientId", "");
  data.append("SecretKey", "");
  data.append("Face1Image", fileInput.files[0], "card-0370362063.jpeg");
   data.append("Face2Image", fileInput.files[0], "WhatsApp Image 2021-11-20 at 19.03.33.jpeg");
   
  var xhr = new XMLHttpRequest();
  xhr.withCredentials = true;
  
  xhr.addEventListener("readystatechange", function() {
    if(this.readyState === 4) {
      console.log(this.responseText);
    }
  });
  
  xhr.open("POST", "https://api.itsaaz.ir/ai/facesimilarity");
  xhr.setRequestHeader("accept", "application/json");
  xhr.setRequestHeader("Authorization", "Bearer YOUR-TOKEN");
  xhr.setRequestHeader("Content-Type", "multipart/form-data");
  
  xhr.send(data);
            

  CURL *curl;
  CURLcode res;
  curl = curl_easy_init();
  if(curl) {
    curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST");
    curl_easy_setopt(curl, CURLOPT_URL, "https://api.itsaaz.ir/ai/facesimilarity");
    curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
    curl_easy_setopt(curl, CURLOPT_DEFAULT_PROTOCOL, "https");
    struct curl_slist *headers = NULL;
    headers = curl_slist_append(headers, "accept: application/json");
    headers = curl_slist_append(headers, "Authorization: Bearer YOUR-TOKEN");
    headers = curl_slist_append(headers, "Content-Type: multipart/form-data");
    curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
    curl_mime *mime;
    curl_mimepart *part;
    mime = curl_mime_init(curl);
    part = curl_mime_addpart(mime);
    curl_mime_name(part, "ClientId");
    curl_mime_data(part, "", CURL_ZERO_TERMINATED);
    part = curl_mime_addpart(mime);
    curl_mime_name(part, "SecretKey");
    curl_mime_data(part, "", CURL_ZERO_TERMINATED);
    part = curl_mime_addpart(mime);
    curl_mime_name(part, "Face1Image");
    curl_mime_filedata(part, "/C:/Users/itsaaz/Downloads/card-0370362063.jpeg");
    part = curl_mime_addpart(mime);
    curl_mime_name(part, "Face2Image");
    curl_mime_filedata(part, "/C:/Users/itsaaz/Downloads/WhatsApp Image 2021-11-20 at 19.03.33.jpeg");
    curl_easy_setopt(curl, CURLOPT_MIMEPOST, mime);
    res = curl_easy_perform(curl);
    curl_mime_free(mime);
  }
  curl_easy_cleanup(curl);
  
        

  var axios = require('axios');
  var FormData = require('form-data');
  var fs = require('fs');
  var data = new FormData();
  data.append('ClientId', '');
  data.append('SecretKey', '');
  data.append('Face1Image', fs.createReadStream('/C:/Users/itsaaz/Downloads/card-0370362063.jpeg'));
  data.append('Face2Image', fs.createReadStream('/C:/Users/itsaaz/Downloads/WhatsApp Image 2021-11-20 at 19.03.33.jpeg'));
  
  var config = {
    method: 'post',
    url: 'https://api.itsaaz.ir/ai/facesimilarity',
    headers: { 
      'accept': 'application/json', 
      'Authorization': 'Bearer YOUR-TOKEN', 
      'Content-Type': 'multipart/form-data', 
      ...data.getHeaders()
    },
    data : data
  };
  
  axios(config)
  .then(function (response) {
    console.log(JSON.stringify(response.data));
  })
  .catch(function (error) {
    console.log(error);
  });
  
            

  var https = require('follow-redirects').https;
  var fs = require('fs');
  
  var options = {
    'method': 'POST',
    'hostname': 'api.itsaaz.ir',
    'path': '/ai/facesimilarity',
    'headers': {
      'accept': 'application/json',
      'Authorization': 'Bearer YOUR-TOKEN',
      'Content-Type': 'multipart/form-data'
    },
    'maxRedirects': 20
  };
  
  var req = https.request(options, function (res) {
    var chunks = [];
  
    res.on("data", function (chunk) {
      chunks.push(chunk);
    });
  
    res.on("end", function (chunk) {
      var body = Buffer.concat(chunks);
      console.log(body.toString());
    });
  
    res.on("error", function (error) {
      console.error(error);
    });
  });
  
  var postData = "------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"ClientId\"\r\n\r\n\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"SecretKey\"\r\n\r\n\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"Face1Image\"; filename=\"card-0370362063.jpeg\"\r\nContent-Type: \"{Insert_File_Content_Type}\"\r\n\r\n" + fs.readFileSync('/C:/Users/itsaaz/Downloads/card-0370362063.jpeg') + "\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"Face2Image\"; filename=\"WhatsApp Image 2021-11-20 at 19.03.33.jpeg\"\r\nContent-Type: \"{Insert_File_Content_Type}\"\r\n\r\n" + fs.readFileSync('/C:/Users/itsaaz/Downloads/WhatsApp Image 2021-11-20 at 19.03.33.jpeg') + "\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW--";
  
  req.setHeader('content-type', 'multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW');
  
  req.write(postData);
  
  req.end();
            

  var request = require('request');
  var fs = require('fs');
  var options = {
    'method': 'POST',
    'url': 'https://api.itsaaz.ir/ai/facesimilarity',
    'headers': {
      'accept': 'application/json',
      'Authorization': 'Bearer YOUR-TOKEN',
      'Content-Type': 'multipart/form-data'
    },
    formData: {
      'ClientId': '',
      'SecretKey': '',
      'Face1Image': {
        'value': fs.createReadStream('/C:/Users/itsaaz/Downloads/card-0370362063.jpeg'),
        'options': {
          'filename': 'card-0370362063.jpeg',
          'contentType': null
        }
      },
      'Face2Image': {
        'value': fs.createReadStream('/C:/Users/itsaaz/Downloads/WhatsApp Image 2021-11-20 at 19.03.33.jpeg'),
        'options': {
          'filename': 'WhatsApp Image 2021-11-20 at 19.03.33.jpeg',
          'contentType': null
        }
      }
    }
  };
  request(options, function (error, response) {
    if (error) throw new Error(error);
    console.log(response.body);
  });
  
            

  var unirest = require('unirest');
  var req = unirest('POST', 'https://api.itsaaz.ir/ai/facesimilarity')
    .headers({
      'accept': 'application/json',
      'Authorization': 'Bearer YOUR-TOKEN',
      'Content-Type': 'multipart/form-data'
    })
    .field('ClientId', '')
    .field('SecretKey', '')
    .attach('file', '/C:/Users/itsaaz/Downloads/card-0370362063.jpeg')
    .attach('file', '/C:/Users/itsaaz/Downloads/WhatsApp Image 2021-11-20 at 19.03.33.jpeg')
    .end(function (res) { 
      if (res.error) throw new Error(res.error); 
      console.log(res.raw_body);
    });
  
            

  #import <Foundation/Foundation.h>

  dispatch_semaphore_t sema = dispatch_semaphore_create(0);
  
  NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://api.itsaaz.ir/ai/facesimilarity"]
    cachePolicy:NSURLRequestUseProtocolCachePolicy
    timeoutInterval:10.0];
  NSDictionary *headers = @{
    @"accept": @"application/json",
    @"Authorization": @"Bearer YOUR-TOKEN",
    @"Content-Type": @"multipart/form-data"
  };
  
  [request setAllHTTPHeaderFields:headers];
  NSArray *parameters = @[
    @{ @"name": @"ClientId", @"value": @"" }, 
    @{ @"name": @"SecretKey", @"value": @"" }, 
    @{ @"name": @"Face1Image", @"fileName": @"/C:/Users/itsaaz/Downloads/card-0370362063.jpeg" }, 
    @{ @"name": @"Face2Image", @"fileName": @"/C:/Users/itsaaz/Downloads/WhatsApp Image 2021-11-20 at 19.03.33.jpeg" } 
  ];
  
  NSString *boundary = @"----WebKitFormBoundary7MA4YWxkTrZu0gW";
  NSError *error;
  NSMutableString *body = [NSMutableString string];
  
  for (NSDictionary *param in parameters) {
    [body appendFormat:@"--%@\r\n", boundary];
    if (param[@"fileName"]) {
      [body appendFormat:@"Content-Disposition:form-data; name=\"%@\"; filename=\"%@\"\r\n", param[@"name"], param[@"fileName"]];
      [body appendFormat:@"Content-Type: %@\r\n\r\n", param[@"contentType"]];
      [body appendFormat:@"%@", [NSString stringWithContentsOfFile:param[@"fileName"] encoding:NSUTF8StringEncoding error:&error]];
      if (error) {
        NSLog(@"%@", error);
      }
    } else {
      [body appendFormat:@"Content-Disposition:form-data; name=\"%@\"\r\n\r\n", param[@"name"]];
      [body appendFormat:@"%@", param[@"value"]];
    }
  }
  [body appendFormat:@"\r\n--%@--\r\n", boundary];
  NSData *postData = [body dataUsingEncoding:NSUTF8StringEncoding];
  [request setHTTPBody:postData];
  
  [request setHTTPMethod:@"POST"];
  
  NSURLSession *session = [NSURLSession sharedSession];
  NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
  completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
    if (error) {
      NSLog(@"%@", error);
      dispatch_semaphore_signal(sema);
    } else {
      NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
      NSError *parseError = nil;
      NSDictionary *responseDictionary = [NSJSONSerialization JSONObjectWithData:data options:0 error:&parseError];
      NSLog(@"%@",responseDictionary);
      dispatch_semaphore_signal(sema);
    }
  }];
  [dataTask resume];
  dispatch_semaphore_wait(sema, DISPATCH_TIME_FOREVER); 
        

  open Lwt
  open Cohttp
  open Cohttp_lwt_unix
  
  let parameters = [|
    [| ("name", "ClientId"); ("value", "") |];
    [| ("name", "SecretKey"); ("value", "") |];
    [| ("name", "Face1Image"); ("fileName", "/C:/Users/itsaaz/Downloads/card-0370362063.jpeg") |];
    [| ("name", "Face2Image"); ("fileName", "/C:/Users/itsaaz/Downloads/WhatsApp Image 2021-11-20 at 19.03.33.jpeg") |]
  |];;
  let boundary = "----WebKitFormBoundary7MA4YWxkTrZu0gW";;
  let postData = ref "";;
  
  for x = 0 to Array.length parameters - 1 do
    let (_, paramName) = parameters.(x).(0) in
    let (paramType, _) = parameters.(x).(1) in
    let accum = "--" ^ boundary ^ "\r\n" ^ "Content-Disposition: form-data; name=\"" ^ paramName ^ "\"" in
    if paramType = "value" then (
      let (_, paramValue) = parameters.(x).(1) in
      postData := if Array.length parameters.(x) == 3 then (
        let (_, contentType) = parameters.(x).(2) in
        !postData ^ accum ^ "\r\n" ^ "Content-Type: " ^ contentType ^ "\r\n\r\n" ^ paramValue ^ "\r\n"
      ) else (
        !postData ^ accum ^ "\r\n\r\n" ^ paramValue ^ "\r\n"
      );
    )
    else if paramType = "fileName" then (
      let (_, filepath) = parameters.(x).(1) in
      postData := !postData ^ accum ^ "; filename=\""^ filepath ^"\"\r\n";
      let ch = open_in filepath in
        let fileContent = really_input_string ch (in_channel_length ch) in
        close_in ch;
      postData := !postData ^ "Content-Type: {content-type header}\r\n\r\n"^ fileContent ^"\r\n";
    )
  done;;
  postData := !postData ^ "--" ^ boundary ^ "--"
  
  let reqBody = 
    let uri = Uri.of_string "https://api.itsaaz.ir/ai/facesimilarity" in
    let headers = Header.init ()
      |> fun h -> Header.add h "accept" "application/json"
      |> fun h -> Header.add h "Authorization" "Bearer YOUR-TOKEN"
      |> fun h -> Header.add h "Content-Type" "multipart/form-data"
      |> fun h -> Header.add h "content-type" "multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW"
    in
    let body = Cohttp_lwt.Body.of_string !postData in
  
    Client.call ~headers ~body `POST uri >>= fun (_resp, body) ->
    body |> Cohttp_lwt.Body.to_string >|= fun body -> body
  
  let () =
    let respBody = Lwt_main.run reqBody in
    print_endline (respBody)
        

  <?php

  $curl = curl_init();
  
  curl_setopt_array($curl, array(
    CURLOPT_URL => 'https://api.itsaaz.ir/ai/facesimilarity',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 0,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_POSTFIELDS => array('ClientId' => '','SecretKey' => '','Face1Image'=> new CURLFILE('/C:/Users/itsaaz/Downloads/card-0370362063.jpeg'),'Face2Image'=> new CURLFILE('/C:/Users/itsaaz/Downloads/WhatsApp Image 2021-11-20 at 19.03.33.jpeg')),
    CURLOPT_HTTPHEADER => array(
      'accept: application/json',
      'Authorization: Bearer YOUR-TOKEN',
      'Content-Type: multipart/form-data'
    ),
  ));
  
  $response = curl_exec($curl);
  
  curl_close($curl);
  echo $response;
  
  
            

  <?php
  require_once 'HTTP/Request2.php';
  $request = new HTTP_Request2();
  $request->setUrl('https://api.itsaaz.ir/ai/facesimilarity');
  $request->setMethod(HTTP_Request2::METHOD_POST);
  $request->setConfig(array(
    'follow_redirects' => TRUE
  ));
  $request->setHeader(array(
    'accept' => 'application/json',
    'Authorization' => 'Bearer YOUR-TOKEN',
    'Content-Type' => 'multipart/form-data'
  ));
  $request->addPostParameter(array(
    'ClientId' => '',
    'SecretKey' => ''
  ));
  $request->addUpload('Face1Image', '/C:/Users/itsaaz/Downloads/card-0370362063.jpeg', 'card-0370362063.jpeg', '<Content-Type Header>');
  $request->addUpload('Face2Image', '/C:/Users/itsaaz/Downloads/WhatsApp Image 2021-11-20 at 19.03.33.jpeg', 'WhatsApp Image 2021-11-20 at 19.03.33.jpeg', '<Content-Type Header>');
  try {
    $response = $request->send();
    if ($response->getStatus() == 200) {
      echo $response->getBody();
    }
    else {
      echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
      $response->getReasonPhrase();
    }
  }
  catch(HTTP_Request2_Exception $e) {
    echo 'Error: ' . $e->getMessage();
  }
            

  <?php
  $client = new http\Client;
  $request = new http\Client\Request;
  $request->setRequestUrl('https://api.itsaaz.ir/ai/facesimilarity');
  $request->setRequestMethod('POST');
  $body = new http\Message\Body;
  $body->addForm(array(
    'ClientId' => '',
    'SecretKey' => ''
  ), array(
      array('name' => 'Face1Image', 'type' => '<Content-Type Header>', 'file' => '/C:/Users/itsaaz/Downloads/card-0370362063.jpeg', 'data' => null),
      array('name' => 'Face2Image', 'type' => '<Content-Type Header>', 'file' => '/C:/Users/itsaaz/Downloads/WhatsApp Image 2021-11-20 at 19.03.33.jpeg', 'data' => null)
  ));
  $request->setBody($body);
  $request->setOptions(array());
  $request->setHeaders(array(
    'accept' => 'application/json',
    'Authorization' => 'Bearer YOUR-TOKEN',
    'Content-Type' => 'multipart/form-data'
  ));
  $client->enqueue($request)->send();
  $response = $client->getResponse();
  echo $response->getBody();
  
            

  $headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
  $headers.Add("accept", "application/json")
  $headers.Add("Authorization", "Bearer YOUR-TOKEN")
  $headers.Add("Content-Type", "multipart/form-data")
  
  $multipartContent = [System.Net.Http.MultipartFormDataContent]::new()
  $stringHeader = [System.Net.Http.Headers.ContentDispositionHeaderValue]::new("form-data")
  $stringHeader.Name = "ClientId"
  $stringContent = [System.Net.Http.StringContent]::new("")
  $stringContent.Headers.ContentDisposition = $stringHeader
  $multipartContent.Add($stringContent)
  
  $stringHeader = [System.Net.Http.Headers.ContentDispositionHeaderValue]::new("form-data")
  $stringHeader.Name = "SecretKey"
  $stringContent = [System.Net.Http.StringContent]::new("")
  $stringContent.Headers.ContentDisposition = $stringHeader
  $multipartContent.Add($stringContent)
  
  $multipartFile = '/C:/Users/itsaaz/Downloads/card-0370362063.jpeg'
  $FileStream = [System.IO.FileStream]::new($multipartFile, [System.IO.FileMode]::Open)
  $fileHeader = [System.Net.Http.Headers.ContentDispositionHeaderValue]::new("form-data")
  $fileHeader.Name = "Face1Image"
  $fileHeader.FileName = "card-0370362063.jpeg"
  $fileContent = [System.Net.Http.StreamContent]::new($FileStream)
  $fileContent.Headers.ContentDisposition = $fileHeader
  $multipartContent.Add($fileContent)
  
  $multipartFile = '/C:/Users/itsaaz/Downloads/WhatsApp Image 2021-11-20 at 19.03.33.jpeg'
  $FileStream = [System.IO.FileStream]::new($multipartFile, [System.IO.FileMode]::Open)
  $fileHeader = [System.Net.Http.Headers.ContentDispositionHeaderValue]::new("form-data")
  $fileHeader.Name = "Face2Image"
  $fileHeader.FileName = "WhatsApp Image 2021-11-20 at 19.03.33.jpeg"
  $fileContent = [System.Net.Http.StreamContent]::new($FileStream)
  $fileContent.Headers.ContentDisposition = $fileHeader
  $multipartContent.Add($fileContent)
  
  $body = $multipartContent
  
  $response = Invoke-RestMethod 'https://api.itsaaz.ir/ai/facesimilarity' -Method 'POST' -Headers $headers -Body $body
  $response | ConvertTo-Json
        

  import http.client
  import mimetypes
  from codecs import encode
  
  conn = http.client.HTTPSConnection("api.itsaaz.ir")
  dataList = []
  boundary = 'wL36Yn8afVp8Ag7AmP8qZ0SA4n1v9T'
  dataList.append(encode('--' + boundary))
  dataList.append(encode('Content-Disposition: form-data; name=ClientId;'))
  
  dataList.append(encode('Content-Type: {}'.format('text/plain')))
  dataList.append(encode(''))
  
  dataList.append(encode(""))
  dataList.append(encode('--' + boundary))
  dataList.append(encode('Content-Disposition: form-data; name=SecretKey;'))
  
  dataList.append(encode('Content-Type: {}'.format('text/plain')))
  dataList.append(encode(''))
  
  dataList.append(encode(""))
  dataList.append(encode('--' + boundary))
  dataList.append(encode('Content-Disposition: form-data; name=Face1Image; filename={0}'.format('card-0370362063.jpeg')))
  
  fileType = mimetypes.guess_type('/C:/Users/itsaaz/Downloads/card-0370362063.jpeg')[0] or 'application/octet-stream'
  dataList.append(encode('Content-Type: {}'.format(fileType)))
  dataList.append(encode(''))
  
  with open('/C:/Users/itsaaz/Downloads/card-0370362063.jpeg', 'rb') as f:
    dataList.append(f.read())
  dataList.append(encode('--' + boundary))
  dataList.append(encode('Content-Disposition: form-data; name=Face2Image; filename={0}'.format('WhatsApp Image 2021-11-20 at 19.03.33.jpeg')))
  
  fileType = mimetypes.guess_type('/C:/Users/itsaaz/Downloads/WhatsApp Image 2021-11-20 at 19.03.33.jpeg')[0] or 'application/octet-stream'
  dataList.append(encode('Content-Type: {}'.format(fileType)))
  dataList.append(encode(''))
  
  with open('/C:/Users/itsaaz/Downloads/WhatsApp Image 2021-11-20 at 19.03.33.jpeg', 'rb') as f:
    dataList.append(f.read())
  dataList.append(encode('--'+boundary+'--'))
  dataList.append(encode(''))
  body = b'\r\n'.join(dataList)
  payload = body
  headers = {
    'accept': 'application/json',
    'Authorization': 'Bearer YOUR-TOKEN',
    'Content-Type': 'multipart/form-data',
    'Content-type': 'multipart/form-data; boundary={}'.format(boundary)
  }
  conn.request("POST", "/ai/facesimilarity", payload, headers)
  res = conn.getresponse()
  data = res.read()
  print(data.decode("utf-8"))
            

  import requests

  url = "https://api.itsaaz.ir/ai/facesimilarity"
  
  payload={'ClientId': '',
  'SecretKey': ''}
  files=[
    ('Face1Image',('card-0370362063.jpeg',open('/C:/Users/itsaaz/Downloads/card-0370362063.jpeg','rb'),'image/jpeg')),
    ('Face2Image',('WhatsApp Image 2021-11-20 at 19.03.33.jpeg',open('/C:/Users/itsaaz/Downloads/WhatsApp Image 2021-11-20 at 19.03.33.jpeg','rb'),'image/jpeg'))
  ]
  headers = {
    'accept': 'application/json',
    'Authorization': 'Bearer YOUR-TOKEN',
    'Content-Type': 'multipart/form-data'
  }
  
  response = requests.request("POST", url, headers=headers, data=payload, files=files)
  
  print(response.text)
  
            

  require "uri"
  require "net/http"
  
  url = URI("https://api.itsaaz.ir/ai/facesimilarity")
  
  https = Net::HTTP.new(url.host, url.port)
  https.use_ssl = true
  
  request = Net::HTTP::Post.new(url)
  request["accept"] = "application/json"
  request["Authorization"] = "Bearer YOUR-TOKEN"
  request["Content-Type"] = "multipart/form-data"
  form_data = [['ClientId', ''],['SecretKey', ''],['Face1Image', File.open('/C:/Users/itsaaz/Downloads/card-0370362063.jpeg')],['Face2Image', File.open('/C:/Users/itsaaz/Downloads/WhatsApp Image 2021-11-20 at 19.03.33.jpeg')]]
  request.set_form form_data, 'multipart/form-data'
  response = https.request(request)
  puts response.read_body
  
        

  http --ignore-stdin --form --follow --timeout 3600 POST 'https://api.itsaaz.ir/ai/facesimilarity' \
  'ClientId'= \
  'SecretKey'= \
  'Face1Image'@/C:/Users/itsaaz/Downloads/card-0370362063.jpeg \
  'Face2Image'@/C:/Users/itsaaz/Downloads/WhatsApp Image 2021-11-20 at 19.03.33.jpeg \
  accept:'application/json' \
  Authorization:'Bearer YOUR-TOKEN' \
  Content-Type:'multipart/form-data'
            

  # wget doesn't support file upload via form data, use curl -F \
  wget --no-check-certificate --quiet \
    --method POST \
    --timeout=0 \
    --header 'accept: application/json' \
    --header 'Authorization: Bearer YOUR-TOKEN' \
    --header 'Content-Type: multipart/form-data' \
    --body-data 'ClientId=&SecretKey=' \
     'https://api.itsaaz.ir/ai/facesimilarity'
            

  import Foundation
  #if canImport(FoundationNetworking)
  import FoundationNetworking
  #endif
  
  var semaphore = DispatchSemaphore (value: 0)
  
  let parameters = [
    [
      "key": "ClientId",
      "value": "",
      "type": "text"
    ],
    [
      "key": "SecretKey",
      "value": "",
      "type": "text"
    ],
    [
      "key": "Face1Image",
      "src": "/C:/Users/itsaaz/Downloads/card-0370362063.jpeg",
      "type": "file"
    ],
    [
      "key": "Face2Image",
      "src": "/C:/Users/itsaaz/Downloads/WhatsApp Image 2021-11-20 at 19.03.33.jpeg",
      "type": "file"
    ]] as [[String : Any]]
  
  let boundary = "Boundary-\(UUID().uuidString)"
  var body = ""
  var error: Error? = nil
  for param in parameters {
    if param["disabled"] == nil {
      let paramName = param["key"]!
      body += "--\(boundary)\r\n"
      body += "Content-Disposition:form-data; name=\"\(paramName)\""
      if param["contentType"] != nil {
        body += "\r\nContent-Type: \(param["contentType"] as! String)"
      }
      let paramType = param["type"] as! String
      if paramType == "text" {
        let paramValue = param["value"] as! String
        body += "\r\n\r\n\(paramValue)\r\n"
      } else {
        let paramSrc = param["src"] as! String
        let fileData = try NSData(contentsOfFile:paramSrc, options:[]) as Data
        let fileContent = String(data: fileData, encoding: .utf8)!
        body += "; filename=\"\(paramSrc)\"\r\n"
          + "Content-Type: \"content-type header\"\r\n\r\n\(fileContent)\r\n"
      }
    }
  }
  body += "--\(boundary)--\r\n";
  let postData = body.data(using: .utf8)
  
  var request = URLRequest(url: URL(string: "https://api.itsaaz.ir/ai/facesimilarity")!,timeoutInterval: Double.infinity)
  request.addValue("application/json", forHTTPHeaderField: "accept")
  request.addValue("Bearer YOUR-TOKEN", forHTTPHeaderField: "Authorization")
  request.addValue("multipart/form-data", forHTTPHeaderField: "Content-Type")
  request.addValue("multipart/form-data; boundary=\(boundary)", forHTTPHeaderField: "Content-Type")
  
  request.httpMethod = "POST"
  request.httpBody = postData
  
  let task = URLSession.shared.dataTask(with: request) { data, response, error in 
    guard let data = data else {
      print(String(describing: error))
      semaphore.signal()
      return
    }
    print(String(data: data, encoding: .utf8)!)
    semaphore.signal()
  }
  
  task.resume()
  semaphore.wait()
  
  
        


سرویس پردازش مشابهت تصویر با فیلم و وضعیت زنده بودن فرد:


۱-متد فراخوانی سرویس POST می باشد.
2- پس از فراخوانی سرویس، اطلاعات کاربر مطابق آنچه در جدول پارامتر های خروجی نمایش داده شده است، ارسال می شود.


  https://api.itsaaz.ir/ai/compareimagevideo
        

      

  Post
        
      

  accept: application/json
  Authorization: Bearer YOUR-TOKEN
  Content-Type: multipart/form-data
        
      

  VideoFile=@"/C:/Users/itsaaz/Downloads/WhatsApp Video 2021-11-20 at 18.54.26.mp4"
  ImageFile=@"/C:/Users/itsaaz/Desktop/WhatsApp_Image_2021-07-31_at_18.10.03.jpeg"
  ImageRefrenceFile=@"/C:/Users/itsaaz/Desktop/WhatsApp_Image_2021-07-31_at_18.10.03.jpeg"
        
      

  {
    "data": {
      "images_verified": صحت تصاویر,
      "images_verified_percentage": درصد صحت تصاویر,
      "is_live": زنده بودن,
      "is_verified_video": صحت فیلم ,
      "video_similarity_percentage": درصد شباهت فیلم,
      "spoofing_flag": جعل بودن,
      "spoofing_value": مقدار جعل بودن
    },
    "meta": null,
    "error": null
  }
        
      

پارامترهای ورودی

ردیف پارامتر ورودی نوع ورودی توضیحات
1 VideoFile File ویدیو دریافتی از فرد
2 ImageFile File تصویر دریافتی از فرد
3 ImageRefrenceFile File تصویر مرجع

پارامترهای خروجی

ردیف پارامتر خروجی نوع خروجی توضیحات
1 images_verified bool صحت تصاویر
2 images_verified_percentage number درصد صحت تصاویر
3 is_live bool وضعیت زنده بودن
4 is_verified_video bool صحت فیلم
5 video_similarity_percentage number درصد صحت فیلم
6 spoofing_flag string وضعیت جعل بودن
7 spoofing_value number مقدار جعل بودن

نمونه کد


  var client = new RestClient("https://api.itsaaz.ir/ai/compareimagevideo");
  client.Timeout = -1;
  var request = new RestRequest(Method.POST);
  request.AddHeader("accept", "application/json");
  request.AddHeader("Authorization", "Bearer YOUR-TOKEN");
  request.AddHeader("Content-Type", "multipart/form-data");
  request.AddParameter("ClientId", "");
  request.AddParameter("SecretKey", "");
  request.AddFile("VideoFile", "/C:/Users/itsaaz/Downloads/WhatsApp Video 2021-11-20 at 18.54.26.mp4");
  request.AddFile("ImageFile", "/C:/Users/itsaaz/Desktop/WhatsApp_Image_2021-07-31_at_18.10.03.jpeg");
  request.AddFile("ImageRefrenceFile", "/C:/Users/itsaaz/Desktop/WhatsApp_Image_2021-07-31_at_18.10.03.jpeg");
  IRestResponse response = client.Execute(request);
  Console.WriteLine(response.Content);
        

  curl --location --request POST 'https://api.itsaaz.ir/ai/compareimagevideo' \
  --header 'accept: application/json' \
  --header 'Authorization: Bearer YOUR-TOKEN' \
  --header 'Content-Type: multipart/form-data' \
  --form 'ClientId=""' \
  --form 'SecretKey=""' \
  --form 'VideoFile=@"/C:/Users/itsaaz/Downloads/WhatsApp Video 2021-11-20 at 18.54.26.mp4"' \
  --form 'ImageFile=@"/C:/Users/itsaaz/Desktop/WhatsApp_Image_2021-07-31_at_18.10.03.jpeg"' \
  --form 'ImageRefrenceFile=@"/C:/Users/itsaaz/Desktop/WhatsApp_Image_2021-07-31_at_18.10.03.jpeg"'
        

  var headers = {
    'accept': 'application/json',
    'Authorization': 'Bearer YOUR-TOKEN',
    'Content-Type': 'multipart/form-data'
  };
  var request = http.MultipartRequest('POST', Uri.parse('https://api.itsaaz.ir/ai/compareimagevideo'));
  request.fields.addAll({
    'ClientId': '',
    'SecretKey': ''
  });
  request.files.add(await http.MultipartFile.fromPath('VideoFile', '/C:/Users/itsaaz/Downloads/WhatsApp Video 2021-11-20 at 18.54.26.mp4'));
  request.files.add(await http.MultipartFile.fromPath('ImageFile', '/C:/Users/itsaaz/Desktop/WhatsApp_Image_2021-07-31_at_18.10.03.jpeg'));
  request.files.add(await http.MultipartFile.fromPath('ImageRefrenceFile', '/C:/Users/itsaaz/Desktop/WhatsApp_Image_2021-07-31_at_18.10.03.jpeg'));
  request.headers.addAll(headers);
  
  http.StreamedResponse response = await request.send();
  
  if (response.statusCode == 200) {
    print(await response.stream.bytesToString());
  }
  else {
    print(response.reasonPhrase);
  }
    
        

  package main

  import (
    "fmt"
    "bytes"
    "mime/multipart"
    "os"
    "path/filepath"
    "io"
    "net/http"
    "io/ioutil"
  )
  
  func main() {
  
    url := "https://api.itsaaz.ir/ai/compareimagevideo"
    method := "POST"
  
    payload := &bytes.Buffer{}
    writer := multipart.NewWriter(payload)
    _ = writer.WriteField("ClientId", "")
    _ = writer.WriteField("SecretKey", "")
    file, errFile3 := os.Open("/C:/Users/itsaaz/Downloads/WhatsApp Video 2021-11-20 at 18.54.26.mp4")
    defer file.Close()
    part3,
           errFile3 := writer.CreateFormFile("VideoFile",filepath.Base("/C:/Users/itsaaz/Downloads/WhatsApp Video 2021-11-20 at 18.54.26.mp4"))
    _, errFile3 = io.Copy(part3, file)
    if errFile3 != nil {
      fmt.Println(errFile3)
      return
    }
    file, errFile4 := os.Open("/C:/Users/itsaaz/Desktop/WhatsApp_Image_2021-07-31_at_18.10.03.jpeg")
    defer file.Close()
    part4,
           errFile4 := writer.CreateFormFile("ImageFile",filepath.Base("/C:/Users/itsaaz/Desktop/WhatsApp_Image_2021-07-31_at_18.10.03.jpeg"))
    _, errFile4 = io.Copy(part4, file)
    if errFile4 != nil {
      fmt.Println(errFile4)
      return
    }
    file, errFile5 := os.Open("/C:/Users/itsaaz/Desktop/WhatsApp_Image_2021-07-31_at_18.10.03.jpeg")
    defer file.Close()
    part5,
           errFile5 := writer.CreateFormFile("ImageRefrenceFile",filepath.Base("/C:/Users/itsaaz/Desktop/WhatsApp_Image_2021-07-31_at_18.10.03.jpeg"))
    _, errFile5 = io.Copy(part5, file)
    if errFile5 != nil {
      fmt.Println(errFile5)
      return
    }
    err := writer.Close()
    if err != nil {
      fmt.Println(err)
      return
    }
  
  
    client := &http.Client {
    }
    req, err := http.NewRequest(method, url, payload)
  
    if err != nil {
      fmt.Println(err)
      return
    }
    req.Header.Add("accept", "application/json")
    req.Header.Add("Authorization", "Bearer YOUR-TOKEN")
    req.Header.Add("Content-Type", "multipart/form-data")
  
    req.Header.Set("Content-Type", writer.FormDataContentType())
    res, err := client.Do(req)
    if err != nil {
      fmt.Println(err)
      return
    }
    defer res.Body.Close()
  
    body, err := ioutil.ReadAll(res.Body)
    if err != nil {
      fmt.Println(err)
      return
    }
    fmt.Println(string(body))
  }
        

  POST /ai/compareimagevideo HTTP/1.1
  Host: api.itsaaz.ir
  accept: application/json
  Authorization: Bearer YOUR-TOKEN
  Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW
  Content-Length: 795
  
  ----WebKitFormBoundary7MA4YWxkTrZu0gW
  Content-Disposition: form-data; name="ClientId"
  
  
  ----WebKitFormBoundary7MA4YWxkTrZu0gW
  Content-Disposition: form-data; name="SecretKey"
  
  
  ----WebKitFormBoundary7MA4YWxkTrZu0gW
  Content-Disposition: form-data; name="VideoFile"; filename="WhatsApp Video 2021-11-20 at 18.54.26.mp4"
  Content-Type: <Content-type header here>
  
  (data)
  ----WebKitFormBoundary7MA4YWxkTrZu0gW
  Content-Disposition: form-data; name="ImageFile"; filename="WhatsApp_Image_2021-07-31_at_18.10.03.jpeg"
  Content-Type: <Content-type header here>
  
  (data)
  ----WebKitFormBoundary7MA4YWxkTrZu0gW
  Content-Disposition: form-data; name="ImageRefrenceFile"; filename="WhatsApp_Image_2021-07-31_at_18.10.03.jpeg"
  Content-Type: <Content-type header here>
  
  (data)
  ----WebKitFormBoundary7MA4YWxkTrZu0gW
  
        

    OkHttpClient client = new OkHttpClient().newBuilder()
    .build();
  MediaType mediaType = MediaType.parse("multipart/form-data");
  RequestBody body = new MultipartBody.Builder().setType(MultipartBody.FORM)
    .addFormDataPart("ClientId","")
    .addFormDataPart("SecretKey","")
    .addFormDataPart("VideoFile","WhatsApp Video 2021-11-20 at 18.54.26.mp4",
      RequestBody.create(MediaType.parse("application/octet-stream"),
      new File("/C:/Users/itsaaz/Downloads/WhatsApp Video 2021-11-20 at 18.54.26.mp4")))
    .addFormDataPart("ImageFile","WhatsApp_Image_2021-07-31_at_18.10.03.jpeg",
      RequestBody.create(MediaType.parse("application/octet-stream"),
      new File("/C:/Users/itsaaz/Desktop/WhatsApp_Image_2021-07-31_at_18.10.03.jpeg")))
    .addFormDataPart("ImageRefrenceFile","WhatsApp_Image_2021-07-31_at_18.10.03.jpeg",
      RequestBody.create(MediaType.parse("application/octet-stream"),
      new File("/C:/Users/itsaaz/Desktop/WhatsApp_Image_2021-07-31_at_18.10.03.jpeg")))
    .build();
  Request request = new Request.Builder()
    .url("https://api.itsaaz.ir/ai/compareimagevideo")
    .method("POST", body)
    .addHeader("accept", "application/json")
    .addHeader("Authorization", "Bearer YOUR-TOKEN")
    .addHeader("Content-Type", "multipart/form-data")
    .build();
  Response response = client.newCall(request).execute();
            

  Unirest.setTimeouts(0, 0);
  HttpResponse<String> response = Unirest.post("https://api.itsaaz.ir/ai/compareimagevideo")
    .header("accept", "application/json")
    .header("Authorization", "Bearer YOUR-TOKEN")
    .header("Content-Type", "multipart/form-data")
    .field("ClientId", "")
    .field("SecretKey", "")
    .field("file", new File("/C:/Users/itsaaz/Downloads/WhatsApp Video 2021-11-20 at 18.54.26.mp4"))
    .field("file", new File("/C:/Users/itsaaz/Desktop/WhatsApp_Image_2021-07-31_at_18.10.03.jpeg"))
    .field("file", new File("/C:/Users/itsaaz/Desktop/WhatsApp_Image_2021-07-31_at_18.10.03.jpeg"))
    .asString();
  
            

  var myHeaders = new Headers();
  myHeaders.append("accept", "application/json");
  myHeaders.append("Authorization", "Bearer YOUR-TOKEN");
  myHeaders.append("Content-Type", "multipart/form-data");
  
  var formdata = new FormData();
  formdata.append("ClientId", "");
  formdata.append("SecretKey", "");
  formdata.append("VideoFile", fileInput.files[0], "WhatsApp Video 2021-11-20 at 18.54.26.mp4");
  formdata.append("ImageFile", fileInput.files[0], "WhatsApp_Image_2021-07-31_at_18.10.03.jpeg");
  formdata.append("ImageRefrenceFile", fileInput.files[0], "WhatsApp_Image_2021-07-31_at_18.10.03.jpeg");
  
  var requestOptions = {
    method: 'POST',
    headers: myHeaders,
    body: formdata,
    redirect: 'follow'
  };
  
  fetch("https://api.itsaaz.ir/ai/compareimagevideo", requestOptions)
    .then(response => response.text())
    .then(result => console.log(result))
    .catch(error => console.log('error', error));
            

  var form = new FormData();
  form.append("ClientId", "");
  form.append("SecretKey", "");
  form.append("VideoFile", fileInput.files[0], "WhatsApp Video 2021-11-20 at 18.54.26.mp4");
  form.append("ImageFile", fileInput.files[0], "WhatsApp_Image_2021-07-31_at_18.10.03.jpeg");
  form.append("ImageRefrenceFile", fileInput.files[0], "WhatsApp_Image_2021-07-31_at_18.10.03.jpeg");
  
  var settings = {
    "url": "https://api.itsaaz.ir/ai/compareimagevideo",
    "method": "POST",
    "timeout": 0,
    "headers": {
      "accept": "application/json",
      "Authorization": "Bearer YOUR-TOKEN",
      "Content-Type": "multipart/form-data"
    },
    "processData": false,
    "mimeType": "multipart/form-data",
    "contentType": false,
    "data": form
  };
  
  $.ajax(settings).done(function (response) {
    console.log(response);
  });
            

  var data = new FormData();
  data.append("ClientId", "");
  data.append("SecretKey", "");
  data.append("VideoFile", fileInput.files[0], "WhatsApp Video 2021-11-20 at 18.54.26.mp4");
   data.append("ImageFile", fileInput.files[0], "WhatsApp_Image_2021-07-31_at_18.10.03.jpeg");
   data.append("ImageRefrenceFile", fileInput.files[0], "WhatsApp_Image_2021-07-31_at_18.10.03.jpeg");
   
  var xhr = new XMLHttpRequest();
  xhr.withCredentials = true;
  
  xhr.addEventListener("readystatechange", function() {
    if(this.readyState === 4) {
      console.log(this.responseText);
    }
  });
  
  xhr.open("POST", "https://api.itsaaz.ir/ai/compareimagevideo");
  xhr.setRequestHeader("accept", "application/json");
  xhr.setRequestHeader("Authorization", "Bearer YOUR-TOKEN");
  xhr.setRequestHeader("Content-Type", "multipart/form-data");
  
  xhr.send(data);
            

  CURL *curl;
  CURLcode res;
  curl = curl_easy_init();
  if(curl) {
    curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST");
    curl_easy_setopt(curl, CURLOPT_URL, "https://api.itsaaz.ir/ai/compareimagevideo");
    curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
    curl_easy_setopt(curl, CURLOPT_DEFAULT_PROTOCOL, "https");
    struct curl_slist *headers = NULL;
    headers = curl_slist_append(headers, "accept: application/json");
    headers = curl_slist_append(headers, "Authorization: Bearer YOUR-TOKEN");
    headers = curl_slist_append(headers, "Content-Type: multipart/form-data");
    curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
    curl_mime *mime;
    curl_mimepart *part;
    mime = curl_mime_init(curl);
    part = curl_mime_addpart(mime);
    curl_mime_name(part, "ClientId");
    curl_mime_data(part, "", CURL_ZERO_TERMINATED);
    part = curl_mime_addpart(mime);
    curl_mime_name(part, "SecretKey");
    curl_mime_data(part, "", CURL_ZERO_TERMINATED);
    part = curl_mime_addpart(mime);
    curl_mime_name(part, "VideoFile");
    curl_mime_filedata(part, "/C:/Users/itsaaz/Downloads/WhatsApp Video 2021-11-20 at 18.54.26.mp4");
    part = curl_mime_addpart(mime);
    curl_mime_name(part, "ImageFile");
    curl_mime_filedata(part, "/C:/Users/itsaaz/Desktop/WhatsApp_Image_2021-07-31_at_18.10.03.jpeg");
    part = curl_mime_addpart(mime);
    curl_mime_name(part, "ImageRefrenceFile");
    curl_mime_filedata(part, "/C:/Users/itsaaz/Desktop/WhatsApp_Image_2021-07-31_at_18.10.03.jpeg");
    curl_easy_setopt(curl, CURLOPT_MIMEPOST, mime);
    res = curl_easy_perform(curl);
    curl_mime_free(mime);
  }
  curl_easy_cleanup(curl);
  
        

  var axios = require('axios');
  var FormData = require('form-data');
  var fs = require('fs');
  var data = new FormData();
  data.append('ClientId', '');
  data.append('SecretKey', '');
  data.append('VideoFile', fs.createReadStream('/C:/Users/itsaaz/Downloads/WhatsApp Video 2021-11-20 at 18.54.26.mp4'));
  data.append('ImageFile', fs.createReadStream('/C:/Users/itsaaz/Desktop/WhatsApp_Image_2021-07-31_at_18.10.03.jpeg'));
  data.append('ImageRefrenceFile', fs.createReadStream('/C:/Users/itsaaz/Desktop/WhatsApp_Image_2021-07-31_at_18.10.03.jpeg'));
  
  var config = {
    method: 'post',
    url: 'https://api.itsaaz.ir/ai/compareimagevideo',
    headers: { 
      'accept': 'application/json', 
      'Authorization': 'Bearer YOUR-TOKEN', 
      'Content-Type': 'multipart/form-data', 
      ...data.getHeaders()
    },
    data : data
  };
  
  axios(config)
  .then(function (response) {
    console.log(JSON.stringify(response.data));
  })
  .catch(function (error) {
    console.log(error);
  });
  
            

  var https = require('follow-redirects').https;
  var fs = require('fs');
  
  var options = {
    'method': 'POST',
    'hostname': 'api.itsaaz.ir',
    'path': '/ai/compareimagevideo',
    'headers': {
      'accept': 'application/json',
      'Authorization': 'Bearer YOUR-TOKEN',
      'Content-Type': 'multipart/form-data'
    },
    'maxRedirects': 20
  };
  
  var req = https.request(options, function (res) {
    var chunks = [];
  
    res.on("data", function (chunk) {
      chunks.push(chunk);
    });
  
    res.on("end", function (chunk) {
      var body = Buffer.concat(chunks);
      console.log(body.toString());
    });
  
    res.on("error", function (error) {
      console.error(error);
    });
  });
  
  var postData = "------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"ClientId\"\r\n\r\n\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"SecretKey\"\r\n\r\n\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"VideoFile\"; filename=\"WhatsApp Video 2021-11-20 at 18.54.26.mp4\"\r\nContent-Type: \"{Insert_File_Content_Type}\"\r\n\r\n" + fs.readFileSync('/C:/Users/itsaaz/Downloads/WhatsApp Video 2021-11-20 at 18.54.26.mp4') + "\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"ImageFile\"; filename=\"WhatsApp_Image_2021-07-31_at_18.10.03.jpeg\"\r\nContent-Type: \"{Insert_File_Content_Type}\"\r\n\r\n" + fs.readFileSync('/C:/Users/itsaaz/Desktop/WhatsApp_Image_2021-07-31_at_18.10.03.jpeg') + "\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"ImageRefrenceFile\"; filename=\"WhatsApp_Image_2021-07-31_at_18.10.03.jpeg\"\r\nContent-Type: \"{Insert_File_Content_Type}\"\r\n\r\n" + fs.readFileSync('/C:/Users/itsaaz/Desktop/WhatsApp_Image_2021-07-31_at_18.10.03.jpeg') + "\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW--";
  
  req.setHeader('content-type', 'multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW');
  
  req.write(postData);
  
  req.end();
            

  var request = require('request');
  var fs = require('fs');
  var options = {
    'method': 'POST',
    'url': 'https://api.itsaaz.ir/ai/compareimagevideo',
    'headers': {
      'accept': 'application/json',
      'Authorization': 'Bearer YOUR-TOKEN',
      'Content-Type': 'multipart/form-data'
    },
    formData: {
      'ClientId': '',
      'SecretKey': '',
      'VideoFile': {
        'value': fs.createReadStream('/C:/Users/itsaaz/Downloads/WhatsApp Video 2021-11-20 at 18.54.26.mp4'),
        'options': {
          'filename': 'WhatsApp Video 2021-11-20 at 18.54.26.mp4',
          'contentType': null
        }
      },
      'ImageFile': {
        'value': fs.createReadStream('/C:/Users/itsaaz/Desktop/WhatsApp_Image_2021-07-31_at_18.10.03.jpeg'),
        'options': {
          'filename': 'WhatsApp_Image_2021-07-31_at_18.10.03.jpeg',
          'contentType': null
        }
      },
      'ImageRefrenceFile': {
        'value': fs.createReadStream('/C:/Users/itsaaz/Desktop/WhatsApp_Image_2021-07-31_at_18.10.03.jpeg'),
        'options': {
          'filename': 'WhatsApp_Image_2021-07-31_at_18.10.03.jpeg',
          'contentType': null
        }
      }
    }
  };
  request(options, function (error, response) {
    if (error) throw new Error(error);
    console.log(response.body);
  });
  
            

  var unirest = require('unirest');
  var req = unirest('POST', 'https://api.itsaaz.ir/ai/compareimagevideo')
    .headers({
      'accept': 'application/json',
      'Authorization': 'Bearer YOUR-TOKEN',
      'Content-Type': 'multipart/form-data'
    })
    .field('ClientId', '')
    .field('SecretKey', '')
    .attach('file', '/C:/Users/itsaaz/Downloads/WhatsApp Video 2021-11-20 at 18.54.26.mp4')
    .attach('file', '/C:/Users/itsaaz/Desktop/WhatsApp_Image_2021-07-31_at_18.10.03.jpeg')
    .attach('file', '/C:/Users/itsaaz/Desktop/WhatsApp_Image_2021-07-31_at_18.10.03.jpeg')
    .end(function (res) { 
      if (res.error) throw new Error(res.error); 
      console.log(res.raw_body);
    });
  
            

  #import <Foundation/Foundation.h>

  dispatch_semaphore_t sema = dispatch_semaphore_create(0);
  
  NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://api.itsaaz.ir/ai/compareimagevideo"]
    cachePolicy:NSURLRequestUseProtocolCachePolicy
    timeoutInterval:10.0];
  NSDictionary *headers = @{
    @"accept": @"application/json",
    @"Authorization": @"Bearer YOUR-TOKEN",
    @"Content-Type": @"multipart/form-data"
  };
  
  [request setAllHTTPHeaderFields:headers];
  NSArray *parameters = @[
    @{ @"name": @"ClientId", @"value": @"" }, 
    @{ @"name": @"SecretKey", @"value": @"" }, 
    @{ @"name": @"VideoFile", @"fileName": @"/C:/Users/itsaaz/Downloads/WhatsApp Video 2021-11-20 at 18.54.26.mp4" }, 
    @{ @"name": @"ImageFile", @"fileName": @"/C:/Users/itsaaz/Desktop/WhatsApp_Image_2021-07-31_at_18.10.03.jpeg" }, 
    @{ @"name": @"ImageRefrenceFile", @"fileName": @"/C:/Users/itsaaz/Desktop/WhatsApp_Image_2021-07-31_at_18.10.03.jpeg" } 
  ];
  
  NSString *boundary = @"----WebKitFormBoundary7MA4YWxkTrZu0gW";
  NSError *error;
  NSMutableString *body = [NSMutableString string];
  
  for (NSDictionary *param in parameters) {
    [body appendFormat:@"--%@\r\n", boundary];
    if (param[@"fileName"]) {
      [body appendFormat:@"Content-Disposition:form-data; name=\"%@\"; filename=\"%@\"\r\n", param[@"name"], param[@"fileName"]];
      [body appendFormat:@"Content-Type: %@\r\n\r\n", param[@"contentType"]];
      [body appendFormat:@"%@", [NSString stringWithContentsOfFile:param[@"fileName"] encoding:NSUTF8StringEncoding error:&error]];
      if (error) {
        NSLog(@"%@", error);
      }
    } else {
      [body appendFormat:@"Content-Disposition:form-data; name=\"%@\"\r\n\r\n", param[@"name"]];
      [body appendFormat:@"%@", param[@"value"]];
    }
  }
  [body appendFormat:@"\r\n--%@--\r\n", boundary];
  NSData *postData = [body dataUsingEncoding:NSUTF8StringEncoding];
  [request setHTTPBody:postData];
  
  [request setHTTPMethod:@"POST"];
  
  NSURLSession *session = [NSURLSession sharedSession];
  NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
  completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
    if (error) {
      NSLog(@"%@", error);
      dispatch_semaphore_signal(sema);
    } else {
      NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
      NSError *parseError = nil;
      NSDictionary *responseDictionary = [NSJSONSerialization JSONObjectWithData:data options:0 error:&parseError];
      NSLog(@"%@",responseDictionary);
      dispatch_semaphore_signal(sema);
    }
  }];
  [dataTask resume];
  dispatch_semaphore_wait(sema, DISPATCH_TIME_FOREVER);  
        

  open Lwt
  open Cohttp
  open Cohttp_lwt_unix
  
  let parameters = [|
    [| ("name", "ClientId"); ("value", "") |];
    [| ("name", "SecretKey"); ("value", "") |];
    [| ("name", "VideoFile"); ("fileName", "/C:/Users/itsaaz/Downloads/WhatsApp Video 2021-11-20 at 18.54.26.mp4") |];
    [| ("name", "ImageFile"); ("fileName", "/C:/Users/itsaaz/Desktop/WhatsApp_Image_2021-07-31_at_18.10.03.jpeg") |];
    [| ("name", "ImageRefrenceFile"); ("fileName", "/C:/Users/itsaaz/Desktop/WhatsApp_Image_2021-07-31_at_18.10.03.jpeg") |]
  |];;
  let boundary = "----WebKitFormBoundary7MA4YWxkTrZu0gW";;
  let postData = ref "";;
  
  for x = 0 to Array.length parameters - 1 do
    let (_, paramName) = parameters.(x).(0) in
    let (paramType, _) = parameters.(x).(1) in
    let accum = "--" ^ boundary ^ "\r\n" ^ "Content-Disposition: form-data; name=\"" ^ paramName ^ "\"" in
    if paramType = "value" then (
      let (_, paramValue) = parameters.(x).(1) in
      postData := if Array.length parameters.(x) == 3 then (
        let (_, contentType) = parameters.(x).(2) in
        !postData ^ accum ^ "\r\n" ^ "Content-Type: " ^ contentType ^ "\r\n\r\n" ^ paramValue ^ "\r\n"
      ) else (
        !postData ^ accum ^ "\r\n\r\n" ^ paramValue ^ "\r\n"
      );
    )
    else if paramType = "fileName" then (
      let (_, filepath) = parameters.(x).(1) in
      postData := !postData ^ accum ^ "; filename=\""^ filepath ^"\"\r\n";
      let ch = open_in filepath in
        let fileContent = really_input_string ch (in_channel_length ch) in
        close_in ch;
      postData := !postData ^ "Content-Type: {content-type header}\r\n\r\n"^ fileContent ^"\r\n";
    )
  done;;
  postData := !postData ^ "--" ^ boundary ^ "--"
  
  let reqBody = 
    let uri = Uri.of_string "https://api.itsaaz.ir/ai/compareimagevideo" in
    let headers = Header.init ()
      |> fun h -> Header.add h "accept" "application/json"
      |> fun h -> Header.add h "Authorization" "Bearer YOUR-TOKEN"
      |> fun h -> Header.add h "Content-Type" "multipart/form-data"
      |> fun h -> Header.add h "content-type" "multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW"
    in
    let body = Cohttp_lwt.Body.of_string !postData in
  
    Client.call ~headers ~body `POST uri >>= fun (_resp, body) ->
    body |> Cohttp_lwt.Body.to_string >|= fun body -> body
  
  let () =
    let respBody = Lwt_main.run reqBody in
    print_endline (respBody)
        

  <?php

  $curl = curl_init();
  
  curl_setopt_array($curl, array(
    CURLOPT_URL => 'https://api.itsaaz.ir/ai/compareimagevideo',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 0,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_POSTFIELDS => array('ClientId' => '','SecretKey' => '','VideoFile'=> new CURLFILE('/C:/Users/itsaaz/Downloads/WhatsApp Video 2021-11-20 at 18.54.26.mp4'),'ImageFile'=> new CURLFILE('/C:/Users/itsaaz/Desktop/WhatsApp_Image_2021-07-31_at_18.10.03.jpeg'),'ImageRefrenceFile'=> new CURLFILE('/C:/Users/itsaaz/Desktop/WhatsApp_Image_2021-07-31_at_18.10.03.jpeg')),
    CURLOPT_HTTPHEADER => array(
      'accept: application/json',
      'Authorization: Bearer YOUR-TOKEN',
      'Content-Type: multipart/form-data'
    ),
  ));
  
  $response = curl_exec($curl);
  
  curl_close($curl);
  echo $response;
  
  
            

  <?php
  require_once 'HTTP/Request2.php';
  $request = new HTTP_Request2();
  $request->setUrl('https://api.itsaaz.ir/ai/compareimagevideo');
  $request->setMethod(HTTP_Request2::METHOD_POST);
  $request->setConfig(array(
    'follow_redirects' => TRUE
  ));
  $request->setHeader(array(
    'accept' => 'application/json',
    'Authorization' => 'Bearer YOUR-TOKEN',
    'Content-Type' => 'multipart/form-data'
  ));
  $request->addPostParameter(array(
    'ClientId' => '',
    'SecretKey' => ''
  ));
  $request->addUpload('VideoFile', '/C:/Users/itsaaz/Downloads/WhatsApp Video 2021-11-20 at 18.54.26.mp4', 'WhatsApp Video 2021-11-20 at 18.54.26.mp4', '<Content-Type Header>');
  $request->addUpload('ImageFile', '/C:/Users/itsaaz/Desktop/WhatsApp_Image_2021-07-31_at_18.10.03.jpeg', 'WhatsApp_Image_2021-07-31_at_18.10.03.jpeg', '<Content-Type Header>');
  $request->addUpload('ImageRefrenceFile', '/C:/Users/itsaaz/Desktop/WhatsApp_Image_2021-07-31_at_18.10.03.jpeg', 'WhatsApp_Image_2021-07-31_at_18.10.03.jpeg', '<Content-Type Header>');
  try {
    $response = $request->send();
    if ($response->getStatus() == 200) {
      echo $response->getBody();
    }
    else {
      echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
      $response->getReasonPhrase();
    }
  }
  catch(HTTP_Request2_Exception $e) {
    echo 'Error: ' . $e->getMessage();
  }
            

  <?php
  $client = new http\Client;
  $request = new http\Client\Request;
  $request->setRequestUrl('https://api.itsaaz.ir/ai/compareimagevideo');
  $request->setRequestMethod('POST');
  $body = new http\Message\Body;
  $body->addForm(array(
    'ClientId' => '',
    'SecretKey' => ''
  ), array(
      array('name' => 'VideoFile', 'type' => '<Content-Type Header>', 'file' => '/C:/Users/itsaaz/Downloads/WhatsApp Video 2021-11-20 at 18.54.26.mp4', 'data' => null),
      array('name' => 'ImageFile', 'type' => '<Content-Type Header>', 'file' => '/C:/Users/itsaaz/Desktop/WhatsApp_Image_2021-07-31_at_18.10.03.jpeg', 'data' => null),
      array('name' => 'ImageRefrenceFile', 'type' => '<Content-Type Header>', 'file' => '/C:/Users/itsaaz/Desktop/WhatsApp_Image_2021-07-31_at_18.10.03.jpeg', 'data' => null)
  ));
  $request->setBody($body);
  $request->setOptions(array());
  $request->setHeaders(array(
    'accept' => 'application/json',
    'Authorization' => 'Bearer YOUR-TOKEN',
    'Content-Type' => 'multipart/form-data'
  ));
  $client->enqueue($request)->send();
  $response = $client->getResponse();
  echo $response->getBody();
  
            

  $headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
  $headers.Add("accept", "application/json")
  $headers.Add("Authorization", "Bearer YOUR-TOKEN")
  $headers.Add("Content-Type", "multipart/form-data")
  
  $multipartContent = [System.Net.Http.MultipartFormDataContent]::new()
  $stringHeader = [System.Net.Http.Headers.ContentDispositionHeaderValue]::new("form-data")
  $stringHeader.Name = "ClientId"
  $stringContent = [System.Net.Http.StringContent]::new("")
  $stringContent.Headers.ContentDisposition = $stringHeader
  $multipartContent.Add($stringContent)
  
  $stringHeader = [System.Net.Http.Headers.ContentDispositionHeaderValue]::new("form-data")
  $stringHeader.Name = "SecretKey"
  $stringContent = [System.Net.Http.StringContent]::new("")
  $stringContent.Headers.ContentDisposition = $stringHeader
  $multipartContent.Add($stringContent)
  
  $multipartFile = '/C:/Users/itsaaz/Downloads/WhatsApp Video 2021-11-20 at 18.54.26.mp4'
  $FileStream = [System.IO.FileStream]::new($multipartFile, [System.IO.FileMode]::Open)
  $fileHeader = [System.Net.Http.Headers.ContentDispositionHeaderValue]::new("form-data")
  $fileHeader.Name = "VideoFile"
  $fileHeader.FileName = "WhatsApp Video 2021-11-20 at 18.54.26.mp4"
  $fileContent = [System.Net.Http.StreamContent]::new($FileStream)
  $fileContent.Headers.ContentDisposition = $fileHeader
  $multipartContent.Add($fileContent)
  
  $multipartFile = '/C:/Users/itsaaz/Desktop/WhatsApp_Image_2021-07-31_at_18.10.03.jpeg'
  $FileStream = [System.IO.FileStream]::new($multipartFile, [System.IO.FileMode]::Open)
  $fileHeader = [System.Net.Http.Headers.ContentDispositionHeaderValue]::new("form-data")
  $fileHeader.Name = "ImageFile"
  $fileHeader.FileName = "WhatsApp_Image_2021-07-31_at_18.10.03.jpeg"
  $fileContent = [System.Net.Http.StreamContent]::new($FileStream)
  $fileContent.Headers.ContentDisposition = $fileHeader
  $multipartContent.Add($fileContent)
  
  $multipartFile = '/C:/Users/itsaaz/Desktop/WhatsApp_Image_2021-07-31_at_18.10.03.jpeg'
  $FileStream = [System.IO.FileStream]::new($multipartFile, [System.IO.FileMode]::Open)
  $fileHeader = [System.Net.Http.Headers.ContentDispositionHeaderValue]::new("form-data")
  $fileHeader.Name = "ImageRefrenceFile"
  $fileHeader.FileName = "WhatsApp_Image_2021-07-31_at_18.10.03.jpeg"
  $fileContent = [System.Net.Http.StreamContent]::new($FileStream)
  $fileContent.Headers.ContentDisposition = $fileHeader
  $multipartContent.Add($fileContent)
  
  $body = $multipartContent
  
  $response = Invoke-RestMethod 'https://api.itsaaz.ir/ai/compareimagevideo' -Method 'POST' -Headers $headers -Body $body
  $response | ConvertTo-Json
        

  import http.client
  import mimetypes
  from codecs import encode
  
  conn = http.client.HTTPSConnection("api.itsaaz.ir")
  dataList = []
  boundary = 'wL36Yn8afVp8Ag7AmP8qZ0SA4n1v9T'
  dataList.append(encode('--' + boundary))
  dataList.append(encode('Content-Disposition: form-data; name=ClientId;'))
  
  dataList.append(encode('Content-Type: {}'.format('text/plain')))
  dataList.append(encode(''))
  
  dataList.append(encode(""))
  dataList.append(encode('--' + boundary))
  dataList.append(encode('Content-Disposition: form-data; name=SecretKey;'))
  
  dataList.append(encode('Content-Type: {}'.format('text/plain')))
  dataList.append(encode(''))
  
  dataList.append(encode(""))
  dataList.append(encode('--' + boundary))
  dataList.append(encode('Content-Disposition: form-data; name=VideoFile; filename={0}'.format('WhatsApp Video 2021-11-20 at 18.54.26.mp4')))
  
  fileType = mimetypes.guess_type('/C:/Users/itsaaz/Downloads/WhatsApp Video 2021-11-20 at 18.54.26.mp4')[0] or 'application/octet-stream'
  dataList.append(encode('Content-Type: {}'.format(fileType)))
  dataList.append(encode(''))
  
  with open('/C:/Users/itsaaz/Downloads/WhatsApp Video 2021-11-20 at 18.54.26.mp4', 'rb') as f:
    dataList.append(f.read())
  dataList.append(encode('--' + boundary))
  dataList.append(encode('Content-Disposition: form-data; name=ImageFile; filename={0}'.format('WhatsApp_Image_2021-07-31_at_18.10.03.jpeg')))
  
  fileType = mimetypes.guess_type('/C:/Users/itsaaz/Desktop/WhatsApp_Image_2021-07-31_at_18.10.03.jpeg')[0] or 'application/octet-stream'
  dataList.append(encode('Content-Type: {}'.format(fileType)))
  dataList.append(encode(''))
  
  with open('/C:/Users/itsaaz/Desktop/WhatsApp_Image_2021-07-31_at_18.10.03.jpeg', 'rb') as f:
    dataList.append(f.read())
  dataList.append(encode('--' + boundary))
  dataList.append(encode('Content-Disposition: form-data; name=ImageRefrenceFile; filename={0}'.format('WhatsApp_Image_2021-07-31_at_18.10.03.jpeg')))
  
  fileType = mimetypes.guess_type('/C:/Users/itsaaz/Desktop/WhatsApp_Image_2021-07-31_at_18.10.03.jpeg')[0] or 'application/octet-stream'
  dataList.append(encode('Content-Type: {}'.format(fileType)))
  dataList.append(encode(''))
  
  with open('/C:/Users/itsaaz/Desktop/WhatsApp_Image_2021-07-31_at_18.10.03.jpeg', 'rb') as f:
    dataList.append(f.read())
  dataList.append(encode('--'+boundary+'--'))
  dataList.append(encode(''))
  body = b'\r\n'.join(dataList)
  payload = body
  headers = {
    'accept': 'application/json',
    'Authorization': 'Bearer YOUR-TOKEN',
    'Content-Type': 'multipart/form-data',
    'Content-type': 'multipart/form-data; boundary={}'.format(boundary)
  }
  conn.request("POST", "/ai/compareimagevideo", payload, headers)
  res = conn.getresponse()
  data = res.read()
  print(data.decode("utf-8"))
            

  import requests

  url = "https://api.itsaaz.ir/ai/compareimagevideo"
  
  payload={'ClientId': '',
  'SecretKey': ''}
  files=[
    ('VideoFile',('WhatsApp Video 2021-11-20 at 18.54.26.mp4',open('/C:/Users/itsaaz/Downloads/WhatsApp Video 2021-11-20 at 18.54.26.mp4','rb'),'application/octet-stream')),
    ('ImageFile',('WhatsApp_Image_2021-07-31_at_18.10.03.jpeg',open('/C:/Users/itsaaz/Desktop/WhatsApp_Image_2021-07-31_at_18.10.03.jpeg','rb'),'image/jpeg')),
    ('ImageRefrenceFile',('WhatsApp_Image_2021-07-31_at_18.10.03.jpeg',open('/C:/Users/itsaaz/Desktop/WhatsApp_Image_2021-07-31_at_18.10.03.jpeg','rb'),'image/jpeg'))
  ]
  headers = {
    'accept': 'application/json',
    'Authorization': 'Bearer YOUR-TOKEN',
    'Content-Type': 'multipart/form-data'
  }
  
  response = requests.request("POST", url, headers=headers, data=payload, files=files)
  
  print(response.text)
  
  
            

  require "uri"
  require "net/http"
  
  url = URI("https://api.itsaaz.ir/ai/compareimagevideo")
  
  https = Net::HTTP.new(url.host, url.port)
  https.use_ssl = true
  
  request = Net::HTTP::Post.new(url)
  request["accept"] = "application/json"
  request["Authorization"] = "Bearer YOUR-TOKEN"
  request["Content-Type"] = "multipart/form-data"
  form_data = [['ClientId', ''],['SecretKey', ''],['VideoFile', File.open('/C:/Users/itsaaz/Downloads/WhatsApp Video 2021-11-20 at 18.54.26.mp4')],['ImageFile', File.open('/C:/Users/itsaaz/Desktop/WhatsApp_Image_2021-07-31_at_18.10.03.jpeg')],['ImageRefrenceFile', File.open('/C:/Users/itsaaz/Desktop/WhatsApp_Image_2021-07-31_at_18.10.03.jpeg')]]
  request.set_form form_data, 'multipart/form-data'
  response = https.request(request)
  puts response.read_body
  
        

  http --ignore-stdin --form --follow --timeout 3600 POST 'https://api.itsaaz.ir/ai/compareimagevideo' \
  'ClientId'= \
  'SecretKey'= \
  'VideoFile'@/C:/Users/itsaaz/Downloads/WhatsApp Video 2021-11-20 at 18.54.26.mp4 \
  'ImageFile'@/C:/Users/itsaaz/Desktop/WhatsApp_Image_2021-07-31_at_18.10.03.jpeg \
  'ImageRefrenceFile'@/C:/Users/itsaaz/Desktop/WhatsApp_Image_2021-07-31_at_18.10.03.jpeg \
  accept:'application/json' \
  Authorization:'Bearer YOUR-TOKEN' \
  Content-Type:'multipart/form-data'
            

  # wget doesn't support file upload via form data, use curl -F \
  wget --no-check-certificate --quiet \
    --method POST \
    --timeout=0 \
    --header 'accept: application/json' \
    --header 'Authorization: Bearer YOUR-TOKEN' \
    --header 'Content-Type: multipart/form-data' \
    --body-data 'ClientId=&SecretKey=' \
     'https://api.itsaaz.ir/ai/compareimagevideo'
            

  import Foundation
  import Foundation
  #if canImport(FoundationNetworking)
  import FoundationNetworking
  #endif
  
  var semaphore = DispatchSemaphore (value: 0)
  
  let parameters = [
    [
      "key": "ClientId",
      "value": "",
      "type": "text"
    ],
    [
      "key": "SecretKey",
      "value": "",
      "type": "text"
    ],
    [
      "key": "VideoFile",
      "src": "/C:/Users/itsaaz/Downloads/WhatsApp Video 2021-11-20 at 18.54.26.mp4",
      "type": "file"
    ],
    [
      "key": "ImageFile",
      "src": "/C:/Users/itsaaz/Desktop/WhatsApp_Image_2021-07-31_at_18.10.03.jpeg",
      "type": "file"
    ],
    [
      "key": "ImageRefrenceFile",
      "src": "/C:/Users/itsaaz/Desktop/WhatsApp_Image_2021-07-31_at_18.10.03.jpeg",
      "type": "file"
    ]] as [[String : Any]]
  
  let boundary = "Boundary-\(UUID().uuidString)"
  var body = ""
  var error: Error? = nil
  for param in parameters {
    if param["disabled"] == nil {
      let paramName = param["key"]!
      body += "--\(boundary)\r\n"
      body += "Content-Disposition:form-data; name=\"\(paramName)\""
      if param["contentType"] != nil {
        body += "\r\nContent-Type: \(param["contentType"] as! String)"
      }
      let paramType = param["type"] as! String
      if paramType == "text" {
        let paramValue = param["value"] as! String
        body += "\r\n\r\n\(paramValue)\r\n"
      } else {
        let paramSrc = param["src"] as! String
        let fileData = try NSData(contentsOfFile:paramSrc, options:[]) as Data
        let fileContent = String(data: fileData, encoding: .utf8)!
        body += "; filename=\"\(paramSrc)\"\r\n"
          + "Content-Type: \"content-type header\"\r\n\r\n\(fileContent)\r\n"
      }
    }
  }
  body += "--\(boundary)--\r\n";
  let postData = body.data(using: .utf8)
  
  var request = URLRequest(url: URL(string: "https://api.itsaaz.ir/ai/compareimagevideo")!,timeoutInterval: Double.infinity)
  request.addValue("application/json", forHTTPHeaderField: "accept")
  request.addValue("Bearer YOUR-TOKEN", forHTTPHeaderField: "Authorization")
  request.addValue("multipart/form-data", forHTTPHeaderField: "Content-Type")
  request.addValue("multipart/form-data; boundary=\(boundary)", forHTTPHeaderField: "Content-Type")
  
  request.httpMethod = "POST"
  request.httpBody = postData
  
  let task = URLSession.shared.dataTask(with: request) { data, response, error in 
    guard let data = data else {
      print(String(describing: error))
      semaphore.signal()
      return
    }
    print(String(data: data, encoding: .utf8)!)
    semaphore.signal()
  }
  
  task.resume()
  semaphore.wait()