UntangledAPI
Api referenceExtract

Extract data from a document using a user-defined JSON Schema

POST
/v1/extract/custom

Authorization

x-api-key<token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://api.untangledapi.com/v1/extract/custom" \  -H "Content-Type: application/json" \  -d '{    "document": {},    "schema": {      "property1": null,      "property2": null    }  }'
{
  "data": {
    "property1": null,
    "property2": null
  },
  "model": "string",
  "usage": {
    "inputTokens": 0,
    "outputTokens": 0
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null
  }
}
{
  "error": {
    "code": "plan_limit_exceeded",
    "message": "string",
    "details": {
      "plan": "free",
      "bucketHeu": 0,
      "requestedHeu": 0,
      "upgradeUrl": "http://example.com"
    }
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null
  }
}