{
  "openapi": "3.0.2",
  "info": {
    "title": "Xynthera AI Interoperability Diagnostics",
    "version": "1.0.0",
    "description": "Hosted diagnostics of sanitized caller metadata: WRPRC producer/consumer, OpenID4VP boundaries, FCAF evidence mapping. Not credential verification, not certification. Paid availability is authoritative in GET /v1/catalog; Three diagnostics cost EUR 0.06 excluding tax per completed operation; exact retry with identical request_id and input is not billed twice. Reuse request_id with identical input on retry. Keep signed receipts client-side.",
    "contact": {
      "url": "https://xynthera-ai.toasty-seal-8877.chatgpt.site/support.html"
    },
    "termsOfService": "https://xynthera-ai.toasty-seal-8877.chatgpt.site/terms.html"
  },
  "servers": [
    {
      "url": "https://pfxxzsnboehxsefyajml.supabase.co/functions/v1/xynthera-ai-payg"
    }
  ],
  "components": {
    "securitySchemes": {
      "BudgetCode": {
        "type": "http",
        "scheme": "bearer",
        "description": "Private payg.* budget recovery code; never put in URL or a public collection."
      }
    }
  },
  "paths": {
    "/v1/execute": {
      "post": {
        "operationId": "xyntheraAIExecuteInteropDiagnostic",
        "summary": "Execute one of three bounded metadata diagnostics",
        "security": [
          {
            "BudgetCode": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "object",
                    "additionalProperties": false,
                    "required": [
                      "sku",
                      "request_id",
                      "input"
                    ],
                    "properties": {
                      "sku": {
                        "type": "string",
                        "enum": [
                          "xyntheraInteropWrprcDiagnose"
                        ]
                      },
                      "request_id": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9._:-]{1,128}$",
                        "maxLength": 128
                      },
                      "input": {
                        "type": "object",
                        "properties": {
                          "source_version": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 100
                          },
                          "producer": {
                            "type": "object",
                            "properties": {
                              "format": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 250
                              },
                              "protected_typ": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 250
                              },
                              "policy_id": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 250
                              },
                              "certificate_policy": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 250
                              },
                              "x5c_count": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 99
                              },
                              "alg": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 250
                              },
                              "public_body": {
                                "type": "boolean"
                              },
                              "status_expiry_utc": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 40
                              }
                            },
                            "required": [
                              "format",
                              "protected_typ",
                              "policy_id",
                              "certificate_policy",
                              "x5c_count",
                              "alg"
                            ],
                            "additionalProperties": false
                          },
                          "consumer": {
                            "type": "object",
                            "properties": {
                              "accepted_format": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 80
                              },
                              "required_typ": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 80
                              },
                              "require_x5c": {
                                "type": "boolean"
                              },
                              "expected_policy_id": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 250
                              }
                            },
                            "required": [
                              "accepted_format",
                              "required_typ",
                              "require_x5c"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "source_version",
                          "producer",
                          "consumer"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  {
                    "type": "object",
                    "additionalProperties": false,
                    "required": [
                      "sku",
                      "request_id",
                      "input"
                    ],
                    "properties": {
                      "sku": {
                        "type": "string",
                        "enum": [
                          "xyntheraInteropOpenid4vpAttribute"
                        ]
                      },
                      "request_id": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9._:-]{1,128}$",
                        "maxLength": 128
                      },
                      "input": {
                        "type": "object",
                        "properties": {
                          "flow": {
                            "type": "object",
                            "properties": {
                              "jar_mode": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 256
                              },
                              "response_mode": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 256
                              },
                              "response_uri": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1000
                              },
                              "credential_format": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 256
                              }
                            },
                            "required": [
                              "jar_mode",
                              "response_mode",
                              "credential_format"
                            ],
                            "additionalProperties": false
                          },
                          "wallet": {
                            "type": "object",
                            "properties": {
                              "effective_client_id": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 256
                              },
                              "error_code": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 100
                              }
                            },
                            "required": [
                              "effective_client_id"
                            ],
                            "additionalProperties": false
                          },
                          "verifier": {
                            "type": "object",
                            "properties": {
                              "handover_client_id": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 256
                              },
                              "error_code": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 100
                              }
                            },
                            "required": [
                              "handover_client_id"
                            ],
                            "additionalProperties": false
                          },
                          "ui": {
                            "type": "object",
                            "properties": {
                              "authorization_client_id": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 256
                              }
                            },
                            "required": [
                              "authorization_client_id"
                            ],
                            "additionalProperties": false
                          },
                          "versions": {
                            "type": "object",
                            "maxProperties": 16,
                            "additionalProperties": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 90
                            }
                          }
                        },
                        "required": [
                          "flow",
                          "wallet",
                          "verifier",
                          "ui"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  {
                    "type": "object",
                    "additionalProperties": false,
                    "required": [
                      "sku",
                      "request_id",
                      "input"
                    ],
                    "properties": {
                      "sku": {
                        "type": "string",
                        "enum": [
                          "xyntheraInteropFcafEvidence"
                        ]
                      },
                      "request_id": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9._:-]{1,128}$",
                        "maxLength": 128
                      },
                      "input": {
                        "type": "object",
                        "properties": {
                          "fcaf_release": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 90
                          },
                          "implementation": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 100
                          },
                          "ics": {
                            "type": "object",
                            "maxProperties": 100,
                            "additionalProperties": {
                              "type": "boolean"
                            }
                          },
                          "cases": {
                            "type": "array",
                            "minItems": 1,
                            "maxItems": 100,
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "requires": {
                                  "type": "array",
                                  "maxItems": 100,
                                  "items": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 120
                                  }
                                },
                                "requirements": {
                                  "type": "array",
                                  "maxItems": 100,
                                  "items": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 120
                                  }
                                }
                              },
                              "required": [
                                "id",
                                "requires",
                                "requirements"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "evidence": {
                            "type": "array",
                            "maxItems": 150,
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 100
                                },
                                "test_case_id": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "sha256": {
                                  "type": "string",
                                  "pattern": "^[a-fA-F0-9]{64}$"
                                },
                                "result": {
                                  "type": "string",
                                  "enum": [
                                    "pass",
                                    "fail",
                                    "inconclusive"
                                  ]
                                },
                                "uri": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1000
                                },
                                "artifact_base64url": {
                                  "type": "string",
                                  "minLength": 2,
                                  "maxLength": 11000
                                }
                              },
                              "required": [
                                "id",
                                "test_case_id",
                                "sha256",
                                "result"
                              ],
                              "additionalProperties": false
                            }
                          }
                        },
                        "required": [
                          "fcaf_release",
                          "implementation",
                          "ics",
                          "cases",
                          "evidence"
                        ],
                        "additionalProperties": false
                      }
                    }
                  }
                ]
              },
              "examples": {
                "xyntheraInteropWrprcDiagnose": {
                  "value": {
                    "sku": "xyntheraInteropWrprcDiagnose",
                    "request_id": "replace-with-unique-request-id",
                    "input": {
                      "source_version": "EUDI reference registrar v0.2.1 / verifier v0.11.1 — public issue #27",
                      "producer": {
                        "format": "jws_json",
                        "protected_typ": "jose+json",
                        "policy_id": "{ itu-t(0) identified-organization(4) etsi(0) eudiwrpa(19475) policy-identifiers(3) wrprc (1)}",
                        "certificate_policy": "ncp-legal (2)",
                        "x5c_count": 0,
                        "alg": "ES256"
                      },
                      "consumer": {
                        "accepted_format": "jws_compact",
                        "required_typ": "rc-wrp+jwt",
                        "require_x5c": true,
                        "expected_policy_id": "0.4.0.19475.3.1"
                      }
                    }
                  }
                },
                "xyntheraInteropOpenid4vpAttribute": {
                  "value": {
                    "sku": "xyntheraInteropOpenid4vpAttribute",
                    "request_id": "replace-with-unique-request-id",
                    "input": {
                      "flow": {
                        "jar_mode": "by_value",
                        "response_mode": "direct_post",
                        "response_uri": "https://example.invalid/callback",
                        "credential_format": "mDOC"
                      },
                      "wallet": {
                        "effective_client_id": "redirect_uri:https://example.invalid/callback",
                        "error_code": "InvalidDeviceSignature"
                      },
                      "verifier": {
                        "handover_client_id": "Verifier",
                        "error_code": "InvalidDeviceSignature"
                      },
                      "ui": {
                        "authorization_client_id": "Verifier"
                      },
                      "versions": {
                        "evidence": "eu-digital-identity-wallet/av-web-verifier-ui#7"
                      }
                    }
                  }
                },
                "xyntheraInteropFcafEvidence": {
                  "value": {
                    "sku": "xyntheraInteropFcafEvidence",
                    "request_id": "replace-with-unique-request-id",
                    "input": {
                      "fcaf_release": "demo-fixture-not-official-baseline",
                      "implementation": "example-wallet-implementation",
                      "ics": {
                        "remote.presentation": true,
                        "proximity.presentation": false
                      },
                      "cases": [
                        {
                          "id": "DEMO-TEST-001-NOT-OFFICIAL",
                          "requires": [
                            "remote.presentation"
                          ],
                          "requirements": [
                            "DEMO-CIR-001"
                          ]
                        },
                        {
                          "id": "DEMO-TEST-002-NOT-OFFICIAL",
                          "requires": [
                            "proximity.presentation"
                          ],
                          "requirements": [
                            "DEMO-CIR-002"
                          ]
                        }
                      ],
                      "evidence": []
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Signed receipt; replay does not debit twice"
          },
          "400": {
            "description": "Invalid, sensitive or unredacted input; no completed-operation debit"
          },
          "401": {
            "description": "Missing or invalid code"
          },
          "402": {
            "description": "Unpaid or insufficient balance"
          },
          "403": {
            "description": "Untrusted browser origin"
          },
          "409": {
            "description": "Idempotency conflict; preserve original inputs and receipt"
          },
          "413": {
            "description": "Request exceeds bounds"
          },
          "415": {
            "description": "JSON required"
          },
          "429": {
            "description": "60/minute or 2000/day per budget exceeded"
          },
          "503": {
            "description": "Service or tariff unavailable"
          }
        }
      }
    },
    "/v1/catalog": {
      "get": {
        "operationId": "xyntheraAIInteropCatalogue",
        "summary": "Public availability and prices; filter sku_id beginning xyntheraInterop",
        "responses": {
          "200": {
            "description": "Catalogue including qualifications and input schemas"
          }
        }
      }
    },
    "/jwks.json": {
      "get": {
        "operationId": "xyntheraAIInteropSigningKeys",
        "summary": "Persistent service public signing keys",
        "responses": {
          "200": {
            "description": "JWKS"
          }
        }
      }
    },
    "/v1/status": {
      "get": {
        "operationId": "xyntheraAIInteropBudgetStatus",
        "security": [
          {
            "BudgetCode": []
          }
        ],
        "responses": {
          "200": {
            "description": "Budget status and remaining micro-EUR balance"
          },
          "401": {
            "description": "Invalid code"
          }
        }
      }
    }
  },
  "x-release-status": "commercial-launch-direct-prepaid",
  "x-rate-limits": {
    "per_minute": 60,
    "per_day": 2000,
    "max_input_bytes": 32768
  },
  "x-marketplace-note": "This is the direct Xynthera service. Do not enable RapidAPI billing over a funded Stripe budget; a dedicated authenticated proxy fulfillment integration is required first.",
  "x-unit-price-eur-ht": "0.06"
}
