> ## Documentation Index
> Fetch the complete documentation index at: https://docs.isofold.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Verify Result Equivalence

> Checks if two result sets are semantically equivalent.

Submit two result sets and verify whether they are semantically equivalent.

This endpoint is typically used to compare:

* The original query result
* The Isofold-optimized query result

Useful for audit logging, testing, and compliance scenarios.

***

## Request

```json theme={null}
{
  "original": [
    { "id": 1, "email": "a@example.com" },
    { "id": 2, "email": "b@example.com" }
  ],
  "rewritten": [
    { "id": 2, "email": "b@example.com" },
    { "id": 1, "email": "a@example.com" }
  ]
}
```

### Fields

| Field       | Type  | Required | Description                         |
| ----------- | ----- | -------- | ----------------------------------- |
| `original`  | array | ✅        | Result set from the original query  |
| `rewritten` | array | ✅        | Result set from the rewritten query |

***

## Response

```json theme={null}
{
  "equal": true,
  "differences": []
}
```

If the results do not match, you’ll see the differences:

```json theme={null}
{
  "equal": false,
  "differences": [
    {
      "row": 2,
      "original": { "id": 3, "email": "c@example.com" },
      "rewritten": null
    }
  ]
}
```

***

## Notes

* Comparison is **order-insensitive**
* Field names must match exactly
* Null vs undefined are treated as distinct

***

Use this endpoint to integrate Isofold verification into your CI, analytics pipelines, or regulated audit flows.

***

Next: [Query Completion Webhook](/api-reference/endpoint/webhook)


## OpenAPI

````yaml POST /verify
openapi: 3.1.0
info:
  title: Isofold API
  description: >-
    Programmatic interface for sending queries, estimating cost, and verifying
    outputs using Isofold.
  version: 1.0.0
servers:
  - url: https://api.isofold.com
security:
  - bearerAuth: []
paths:
  /verify:
    post:
      description: Checks if two result sets are semantically equivalent.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VerificationRequest'
      responses:
        '200':
          description: Verification result
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VerificationResult'
components:
  schemas:
    VerificationRequest:
      type: object
      properties:
        original:
          type: array
          items:
            type: object
        rewritten:
          type: array
          items:
            type: object
    VerificationResult:
      type: object
      properties:
        equal:
          type: boolean
        differences:
          type: array
          items:
            type: object
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````