# FinanceGPT generated client starter
# Source: FinanceGPT API v2 OpenAPI index
# OpenAPI SHA-256: 228f3cf999f801d03634f0dad1fc6d296671bc13a8cf0d80994b00a57b62f910
# Operations: post-lqm-workflow-outcomes
# 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 not __import__('os').environ.get('FINANCEGPT_API_KEY'):
    raise RuntimeError('FINANCEGPT_API_KEY is required')

# Record a workspace LQM workflow outcome observation | scope: lqm:build:write
import json
import os
import requests

response = requests.request(
    'POST',
    'https://financegpt.dev/api/v2/lqm/workflow-outcomes',
    headers={
        'Authorization': 'Bearer ' + os.environ['FINANCEGPT_API_KEY'],
        'Accept': 'application/json',
    },
    json=json.loads('{"source_reference":"string","business_unit_key":"string","model_id":1,"model_version_id":1,"manual_duration_ms":0,"assisted_duration_ms":0,"task_success":true,"quality_score_bps":0,"avoided_premium_calls":0,"cost_minor":0,"currency":"string","evidence_reference":"string"}'),
)
response.raise_for_status()
print(response.json())
