DemoRequest.php 453 B

12345678910111213141516171819
  1. <?php
  2. require('../../vendor/autoload.php');
  3. use Volc\Service\ImageX;
  4. $client = ImageX::getInstance();
  5. // call below method if you dont set ak and sk in ~/.volc/config
  6. $client->setAccessKey("ak");
  7. $client->setSecretKey("sk");
  8. $config = [
  9. "query" => [], // api query param
  10. "json" => [], // api json param
  11. ];
  12. // ImageX api doc: https://www.volcengine.cn/docs/508/14106
  13. $response = $client->requestImageX("Action", $config);
  14. echo $response;