Revit automation API · v1

Revit automation API. Parameters, jobs and outputs.

Integrate modelKit with your product workflow: select a published RFA template, validate parameters, create Revit jobs and download the results. Each family contract defines its available fields.

01

Workflow

modelKit works with prepared RFA families. Before your first request, you need an organization and project, a published template, an integration key and a Revit client linked to the project.

  1. 1. Prepare. Upload an RFA to the dashboard. Run an inspection, configure the fields, validate the revision in Revit and publish it.
  2. 2. Get the contract. Retrieve the available catalog and the JSON Schema for your selected template.
  3. 3. Preview. Check mappings and default values without creating a job.
  4. 4. Create a job. Submit the configuration with a request_id. Revit processes it when a compatible client is available.
  5. 5. Get the outputs. Read the status, review any errors and download the available files.
Revit environment
The worker is a pyRevit extension running on Windows with Revit 2025 or 2027 open. The job version must match the client. An RFA saved in 2027 cannot be processed in 2025. Validate each family and its exports in your own Revit environment.

This workflow saves a standalone family. It does not place an instance in an open RVT project or convert drawings or images into BIM models.

02

Access and API keys

Integration requests require a Bearer token for a client belonging to one project. An administrator assigns scopes and model access. The key can access only its own jobs and permitted templates.

HTTP · integration request headers
Authorization: Bearer <integration_token>
Content-Type: application/json
ParameterTypeConditionDescription
catalogscopeGETCatalog, contracts and revision comparisons
previewscopePOSTValidate parameter mappings
jobs:createscopePOSTCreate a job
jobs:readscopeGETRead the status of your own job
artifacts:readscopeGETDownload files and ZIP packages

Issue or rotate keys through Django admin or the register_modelkit_client server command. Store the key on the server side of your integration. The Revit client uses a separate key, which is not valid for the producer API.

Dashboard sign-in
The dashboard uses a Django account, a session cookie and CSRF protection. An administrator creates accounts; public registration is not available. Sign in through the dashboard using your account credentials.

For the session API, GET /api/cabinet/csrf/ returns CSRF data, POST /api/cabinet/auth/login/ signs in and GET /api/cabinet/me/ returns the user. These routes are separate from the Bearer API below.

03

Templates and contracts

All endpoint paths below are relative to /api/modelkit/v1/. Keep the trailing slash. The catalog is limited by the project and the permissions assigned to your key.

GET/catalog/
GET/templates/{product_type_id}/contract/
GET/templates/{product_type_id}/revisions/{revision_number}/diff/
bash · catalog
# BASE_URL is your deployment root; TOKEN is your integration key
curl "$BASE_URL/api/modelkit/v1/catalog/" \
  -H "Authorization: Bearer $TOKEN"

The catalog returns templates with product_type_id, fields, revit_version, revision and contract_url. The contract contains json_schema, example, revision details, dependencies and validation results. Use the example from your template contract for the first request.

Editable parameters
Supported fields are numeric and Boolean: lengths in mm, angles in degrees, integers and true/false. Formula-driven, read-only and reporting parameters are excluded from editable fields. Text and materials may appear in metadata but cannot be submitted as editable values. Missing min/max values are not calculated automatically.

Configuration changes are saved in a draft. Publication follows validation scenarios and approval; the integration contract does not expose the draft pending_revision. Revision comparisons are available for published and superseded revisions.

04

Parameter validation

POST/preview/
POST/templates/{product_type_id}/preview/

Preview maps and validates fields without creating a job or recalculating geometry. The example below uses illustrative dimension keys. Replace product_type_id with an ID from your catalog and use the parameter names and values defined by its contract.

JSON · POST /preview/ body
{
  "product_type_id": "<product_type_id>",
  "parameters": {
    "Width": 3000,
    "Height": 3000,
    "Depth": 400
  }
}
ParameterTypeConditionDescription
parametersobjectone input sourceInput keys and values from your system
productobjectinstead of parametersCProduct: inputParameters[].parametr.name and parametr.val
revit_parametersobjectoptionalOverrides using the selected template fields keys
product_type_idstring / integercatalog IDSelect a template directly; may be omitted in a template-specific URL
revit_versionstring2025 / 2027Defaults to the template version when omitted

The response contains template_id, revit_version, cleaned parameters and mapping. Review mapped, unmapped_parameters, defaults and warnings inside mapping. Unmapped fields do not control geometry.

Review mapping warnings
Preview returns warnings without requiring confirmation. Creating a job with those warnings requires accept_mapping_warnings: true. This acknowledges defaults and unapplied fields; it does not apply those fields. Preview also returns requires_parameter_audit: true and does not confirm successful execution in Revit.
05

Create a job

POST/jobs/
POST/templates/{product_type_id}/jobs/

After reviewing preview, submit the configuration with a nonempty request_id of up to 128 characters. The example explicitly accepts warnings; use this flag only after reviewing mapping.

JSON · POST /jobs/ body
{
  "request_id": "order-123-item-1-rev-1",
  "product_type_id": "<product_type_id>",
  "parameters": {
    "Width": 3000,
    "Height": 3000,
    "Depth": 400
  },
  "accept_mapping_warnings": true,
  "outputs": [
    "rfa",
    "mesh.json",
    "front.dwg",
    "top.dwg",
    "side.dwg",
    "combined.dwg"
  ]
}

Save the JSON as job.json. Replace the template ID and use a new request_id for each new configuration.

bash · create a job
curl -X POST "$BASE_URL/api/modelkit/v1/jobs/" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  --data-binary @job.json
ParameterTypeConditionDescription
202new jobacceptedReturns job_id (UUID), status, status_url and the remaining job fields
200retrysame ID and bodyReturns the existing job in its current state
409conflictsame ID, different bodyUse a new request_id for the modified request
Idempotency
request_id is unique within an integration client. A retry after a network error must preserve the entire JSON body: parameters, outputs, callback_url and all other fields. The same parameters with a different request_id create a separate job. A 202 response means the job is queued; the files are not yet ready.
06

Status and outputs

GET/jobs/{job_id}/
GET/jobs/{job_id}/artifacts/{extension}/
GET/jobs/{job_id}/package/
queued

Queued. Waiting for a compatible Revit client.

running

The client is processing the job; stage identifies the current step.

succeeded

The requested outputs are ready.

partial

Some exports did not complete. Review available files and errors.

failed

The job failed.

cancelled

The job was cancelled.

The response includes error, error_code, error_detail, timings, mapping, requested_outputs and artifacts. The result may contain audit, preview_error and dwg_errors. The artifacts list includes only available files, their URLs and download metadata.

ParameterTypeConditionDescription
rfafileoutputsFamily saved in the Revit version that processed the job
mesh.jsonJSONoutputsGeometry for a 3D preview
front.dwgDWGoutputsFront view
top.dwgDWGoutputsTop view
side.dwgDWGoutputsSide view
combined.dwgDWGoutputsCombined file containing all three views

When outputs is omitted, all six files are requested. An explicit list must be nonempty and contain no duplicates. PDF, XLSX, IFC and RVT are not supported outputs. The ZIP package is available for succeeded or partial jobs and includes available files, request.json, result.json, parameter-receipt.json, manifest.json and manifest.sig.

bash · status and package
curl "$BASE_URL/api/modelkit/v1/jobs/$JOB_ID/" \
  -H "Authorization: Bearer $TOKEN"

# Download the package after succeeded or partial
curl --fail "$BASE_URL/api/modelkit/v1/jobs/$JOB_ID/package/" \
  -H "Authorization: Bearer $TOKEN" \
  --output result.zip
Downloads also require a key
Response URLs are not public links. File and package downloads require the same integration client with the artifacts:read scope. Individual files include X-Artifact-SHA256 when metadata is available. The ZIP manifest signature is returned in X-Package-Signature.

Job listing, retries and cancellation are handled by the dashboard and separate session routes. This integration API does not provide GET /jobs/ or POST /jobs/{job_id}/cancel/.

07

Callback events

Pass callback_url when creating a job. There is no separate subscription endpoint. By default, it must be an HTTPS URL without credentials or a fragment; localhost and private addresses are rejected. The receiver gets started and attention events, plus the terminal states succeeded, partial, failed and cancelled.

HTTP · callback headers
Content-Type: application/json
X-ModelKit-Event: succeeded
X-ModelKit-Delivery: <delivery_id>
X-ModelKit-Timestamp: <unix_timestamp>
X-ModelKit-Signature: sha256=<hex_digest>

The JSON contains event, event_id, job_id, request_id, status, stage, error_code, occurred_at and status_url. For succeeded and partial, package_url is added. The event_id is formed as job_id:event; use it to prevent duplicate processing.

Signature · HMAC-SHA256
message = UTF8(timestamp + ".") + raw_request_body
signature = HMAC_SHA256(signing_secret, message).hexdigest()
header = "sha256=" + signature
Configure delivery on the server
The operator must configure MODELKIT_WEBHOOK_SIGNING_SECRET and run the deliver_webhooks command; callback_url alone does not enable background delivery. Agree on the signing secret with the receiver separately from the API key.

HTTP 2xx marks successful delivery. Defaults are 8 attempts and a 10-second request timeout. After an error, the delay is min(3600, 2^attempts × 5) seconds. The operator can configure these values; actual delivery depends on running the delivery command. When callbacks are enabled, the job response webhook field shows delivered, pending and failed counts.

08

Errors and limits

General errors return an error string. Parameter validation errors return an errors object whose keys identify invalid fields or mappings. The message below is translated for reference; actual response wording may differ.

JSON · 422 · missing request_id
{
  "errors": {
    "request_id": "A nonempty string of up to 128 characters. Reuse it when retrying after network errors."
  }
}
ParameterTypeConditionDescription
400bad requestJSONInvalid JSON, an unsupported structure or an invalid value
401UnauthorizedkeyNo valid integration key
403ForbiddenpermissionsMissing scope or a read-only project
404Not foundresourceThe template, job or file is missing or inaccessible to this client
405Method not allowedmethodCheck the HTTP method; allowed methods are listed in Allow
409conflictrequest_idThis ID has already been used with a different body
413Request too largebody > 256 KiBThe JSON request exceeds the size limit
415Use application/jsonContent-TypePOST requires application/json
422invalid parameterserrorsValidation failed or mapping warnings were not accepted
429Queue fullproject queueThe configured limit for queued HTTP jobs has been reached
503Queue busyRetry-After: 2Retry with the same request_id and body

parameters accepts up to 512 fields; product.inputParameters accepts up to 512 entries. Input parameter names must be 1–120 characters. Values must be scalar, with a string representation of up to 4096 characters. REVIT_MAX_QUEUED_JOBS sets the queue limit, which defaults to 1,000 queued jobs per project. This handler does not impose a universal requests-per-minute limit.

Integration boundaries
The API accepts the configuration of a prepared family and validates it against its contract. It does not calculate structural capacity, guarantee compliant structural drawings or replace engineering review. Execution time depends on the family, requested exports and available Revit client.

Start with your template contract

Open the catalog with your assigned key, retrieve the example for your selected model and run preview. Swagger connects to your deployment and sends real requests.

Open Swagger UI ↗
Available templates, parameter contracts, the server address and operational settings depend on your deployment.