Affinda · Arazzo Workflow

Affinda Create Document Type and Generate JSON Schema

Version 1.0.0

Create a document type in an organization, then generate a JSON schema and Pydantic models from it.

1 workflow 1 source API 1 provider
View Spec View on GitHub Artificial IntelligenceDocument ProcessingIntelligent Document ProcessingIDPOCRResume ParsingInvoice ParsingReceipt ParsingDocument ExtractionDocument ClassificationDocument SplittingRecruitmentBankingInsuranceLogisticsHealthcareGovernmentArazzoWorkflows

Provider

affinda

Workflows

document-type-to-json-schema
Create a document type and generate a JSON schema and Pydantic models from it.
Creates a document type, then calls the schema and Pydantic generation endpoints against the new type's identifier.
3 steps inputs: description, modelName, name, organization, schemaTitle outputs: documentTypeIdentifier, jsonSchema, pydanticCode
1
createDocumentType
Create a new document type within the organization.
2
generateJsonSchema
Generate a JSON schema representation of the new document type.
3
generatePydanticModels
Generate Pydantic model code from the new document type.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Affinda Create Document Type and Generate JSON Schema
  summary: Create a document type in an organization, then generate a JSON schema and Pydantic models from it.
  description: >-
    Defines a new document type and immediately derives machine-readable artifacts
    from it. A document type is created within an organization, a JSON schema is
    generated from that type for downstream validation or code generation, and
    Pydantic model code is generated for Python consumers. Every step spells out
    its request inline so the flow can be read and executed without opening the
    underlying OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: documentTypesApi
  url: ../openapi/affinda-document-types-api-openapi.yml
  type: openapi
workflows:
- workflowId: document-type-to-json-schema
  summary: Create a document type and generate a JSON schema and Pydantic models from it.
  description: >-
    Creates a document type, then calls the schema and Pydantic generation
    endpoints against the new type's identifier.
  inputs:
    type: object
    required:
    - organization
    - name
    properties:
      organization:
        type: string
        description: The organization identifier that will own the document type.
      name:
        type: string
        description: The name of the new document type.
      description:
        type: string
        description: Optional description of the document type.
      schemaTitle:
        type: string
        description: Optional title to use for the generated JSON schema.
      modelName:
        type: string
        description: Optional name for the generated Pydantic model.
  steps:
  - stepId: createDocumentType
    description: Create a new document type within the organization.
    operationId: createDocumentType
    requestBody:
      contentType: application/json
      payload:
        name: $inputs.name
        description: $inputs.description
        organization: $inputs.organization
    successCriteria:
    - condition: $statusCode == 201
    outputs:
      identifier: $response.body#/identifier
  - stepId: generateJsonSchema
    description: Generate a JSON schema representation of the new document type.
    operationId: jsonSchemaFromDocumentType
    parameters:
    - name: identifier
      in: path
      value: $steps.createDocumentType.outputs.identifier
    - name: title
      in: query
      value: $inputs.schemaTitle
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      jsonSchema: $response.body
  - stepId: generatePydanticModels
    description: Generate Pydantic model code from the new document type.
    operationId: pydanticModelsFromDocumentType
    parameters:
    - name: identifier
      in: path
      value: $steps.createDocumentType.outputs.identifier
    - name: model_name
      in: query
      value: $inputs.modelName
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      code: $response.body#/code
  outputs:
    documentTypeIdentifier: $steps.createDocumentType.outputs.identifier
    jsonSchema: $steps.generateJsonSchema.outputs.jsonSchema
    pydanticCode: $steps.generatePydanticModels.outputs.code

Work with this as data

Every workflow here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for arazzo workflows

4 MCP tools reach this
  • find_arazzoBrowse and filter every workflow in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This workflow
curl "https://apis.io/api/v1/arazzo/affinda-document-type-to-json-schema-workflow"
All arazzo workflows
curl "https://apis.io/api/v1/arazzo?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.