<?php
// FinanceGPT generated client starter
// Source: FinanceGPT API v2 OpenAPI index
// OpenAPI SHA-256: 228f3cf999f801d03634f0dad1fc6d296671bc13a8cf0d80994b00a57b62f910
// Operations: post-investment-themes-discover
// Credential: FINANCEGPT_API_KEY environment variable; no credential is embedded.
// Authority: API identity and generated code do not create model-promotion, QLM-binding or Financial Actions authority.

if (!getenv('FINANCEGPT_API_KEY')) { throw new RuntimeException('FINANCEGPT_API_KEY is required'); }

// Discover and save an evidence-backed thematic universe from free text | scope: investment:run
$ch = curl_init('https://financegpt.dev/api/v2/investment/themes/discover');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer '.getenv('FINANCEGPT_API_KEY'),
        'Accept: application/json',
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => json_encode(array (
  'name' => 'string',
  'concept' => 'string',
  'exchanges' => 
  array (
    0 => 'string',
  ),
  'countries' => 
  array (
    0 => 'string',
  ),
  'currencies' => 
  array (
    0 => 'string',
  ),
  'restricted_symbols' => 
  array (
    0 => 'string',
  ),
  'require_company_profile' => false,
  'min_relevance' => 0.01000000000000000020816681711721685132943093776702880859375,
  'min_confidence' => 0,
  'min_verified_facts' => 0,
  'max_results' => 50,
)),
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
