Civitai · Arazzo Workflow

Civitai Permission-Gated Version Download

Version 1.0.0

Resolve a model version, check the bearer's permissions, and branch on download rights.

1 workflow 2 source APIs 1 provider
View Spec View on GitHub Artificial IntelligenceImage-GenerationVideo GenerationStable DiffusionSDXLFluxLoRAModel HostingCommunityGenerative AIArazzoWorkflows

Provider

civitai

Workflows

permission-gated-download
Check permissions on a model version and branch on download rights.
Resolves a model version, checks the bearer's permissions, and either surfaces the download URL or ends without it.
3 steps inputs: apiKey, modelVersionId outputs: canDownload, downloadUrl, versionId
1
resolveVersion
Resolve the model version so the permission check has a confirmed entity id.
2
checkPermission
Check the current bearer's permissions against the model version, then branch on the download decision.
3
surfaceDownload
Reload the model version to surface the download URL once download is permitted.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Civitai Permission-Gated Version Download
  summary: Resolve a model version, check the bearer's permissions, and branch on download rights.
  description: >-
    Enforces permission checks before exposing a download URL. The workflow
    resolves a model version, runs a permission check for the current bearer
    against that version, and then branches: when download is permitted it
    reloads the version to surface the download URL, and when it is not it ends
    the flow without exposing a link. 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: modelversionsApi
  url: ../openapi/civitai-modelversions-api-openapi.yml
  type: openapi
- name: permissionsApi
  url: ../openapi/civitai-permissions-api-openapi.yml
  type: openapi
workflows:
- workflowId: permission-gated-download
  summary: Check permissions on a model version and branch on download rights.
  description: >-
    Resolves a model version, checks the bearer's permissions, and either
    surfaces the download URL or ends without it.
  inputs:
    type: object
    required:
    - apiKey
    - modelVersionId
    properties:
      apiKey:
        type: string
        description: Civitai personal API token used as a Bearer credential.
      modelVersionId:
        type: integer
        description: The model version id to evaluate for download.
  steps:
  - stepId: resolveVersion
    description: >-
      Resolve the model version so the permission check has a confirmed entity
      id.
    operationId: getModelVersion
    parameters:
    - name: Authorization
      in: header
      value: Bearer $inputs.apiKey
    - name: id
      in: path
      value: $inputs.modelVersionId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      versionId: $response.body#/id
      versionName: $response.body#/name
  - stepId: checkPermission
    description: >-
      Check the current bearer's permissions against the model version, then
      branch on the download decision.
    operationId: checkPermissions
    parameters:
    - name: Authorization
      in: header
      value: Bearer $inputs.apiKey
    - name: entityType
      in: query
      value: ModelVersion
    - name: entityId
      in: query
      value: $steps.resolveVersion.outputs.versionId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      canDownload: $response.body#/canDownload
      canView: $response.body#/canView
    onSuccess:
    - name: downloadAllowed
      type: goto
      stepId: surfaceDownload
      criteria:
      - context: $response.body
        condition: $.canDownload == true
        type: jsonpath
    - name: downloadDenied
      type: end
      criteria:
      - context: $response.body
        condition: $.canDownload == false
        type: jsonpath
  - stepId: surfaceDownload
    description: >-
      Reload the model version to surface the download URL once download is
      permitted.
    operationId: getModelVersion
    parameters:
    - name: Authorization
      in: header
      value: Bearer $inputs.apiKey
    - name: id
      in: path
      value: $steps.resolveVersion.outputs.versionId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      downloadUrl: $response.body#/downloadUrl
      air: $response.body#/air
  outputs:
    versionId: $steps.resolveVersion.outputs.versionId
    canDownload: $steps.checkPermission.outputs.canDownload
    downloadUrl: $steps.surfaceDownload.outputs.downloadUrl

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/civitai-permission-gated-download-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.