naftiko: 1.0.0-alpha2 info: label: Civitai Orchestration API — Workflows description: 'Civitai Orchestration API — Workflows. Submit, query, update, patch, and cancel AI generation workflows that race multiple providers behind a single contract. Self-contained Naftiko capability.' tags: - Civitai - Orchestration - Workflows created: '2026-05-25' modified: '2026-05-25' binds: - namespace: env keys: CIVITAI_API_KEY: CIVITAI_API_KEY capability: consumes: - type: http namespace: orchestration-workflows baseUri: https://orchestration.civitai.com description: Civitai Orchestration Workflows. resources: - name: workflows path: /v2/consumer/workflows operations: - name: submitworkflow method: POST description: Submit a new workflow. outputRawFormat: json outputParameters: - { name: result, type: object, value: $. } inputParameters: - { name: body, in: body, type: object, required: true } - name: queryworkflows method: GET description: Query workflows. outputRawFormat: json outputParameters: - { name: result, type: object, value: $. } inputParameters: - { name: take, in: query, type: integer } - { name: cursor, in: query, type: string } - { name: status, in: query, type: string } - name: workflow path: /v2/consumer/workflows/{workflowId} operations: - name: getworkflow method: GET description: Get a workflow by ID. outputRawFormat: json outputParameters: - { name: result, type: object, value: $. } inputParameters: - { name: workflowId, in: path, type: string, required: true } - name: updateworkflow method: PUT description: Update a workflow. outputRawFormat: json outputParameters: - { name: result, type: object, value: $. } inputParameters: - { name: workflowId, in: path, type: string, required: true } - { name: body, in: body, type: object, required: true } - name: patchworkflow method: PATCH description: Patch a workflow. outputRawFormat: json outputParameters: - { name: result, type: object, value: $. } inputParameters: - { name: workflowId, in: path, type: string, required: true } - { name: body, in: body, type: object, required: true } - name: deleteworkflow method: DELETE description: Delete or cancel a workflow. outputRawFormat: json outputParameters: - { name: result, type: object, value: $. } inputParameters: - { name: workflowId, in: path, type: string, required: true } authentication: type: apikey key: Authorization value: 'Bearer {{env.CIVITAI_API_KEY}}' placement: header exposes: - type: rest namespace: orchestration-workflows-rest port: 8080 description: REST adapter for Orchestration Workflows. resources: - path: /v2/consumer/workflows name: workflows operations: - method: POST name: submitworkflow description: Submit a workflow. call: orchestration-workflows.submitworkflow with: { body: rest.body } outputParameters: [{ type: object, mapping: $. }] - method: GET name: queryworkflows description: Query workflows. call: orchestration-workflows.queryworkflows with: take: rest.query.take cursor: rest.query.cursor status: rest.query.status outputParameters: [{ type: object, mapping: $. }] - path: /v2/consumer/workflows/{workflowId} name: workflow operations: - method: GET name: getworkflow description: Get a workflow. call: orchestration-workflows.getworkflow with: { workflowId: rest.path.workflowId } outputParameters: [{ type: object, mapping: $. }] - method: PUT name: updateworkflow description: Update a workflow. call: orchestration-workflows.updateworkflow with: workflowId: rest.path.workflowId body: rest.body outputParameters: [{ type: object, mapping: $. }] - method: PATCH name: patchworkflow description: Patch a workflow. call: orchestration-workflows.patchworkflow with: workflowId: rest.path.workflowId body: rest.body outputParameters: [{ type: object, mapping: $. }] - method: DELETE name: deleteworkflow description: Delete a workflow. call: orchestration-workflows.deleteworkflow with: { workflowId: rest.path.workflowId } outputParameters: [{ type: object, mapping: $. }] - type: mcp namespace: orchestration-workflows-mcp port: 9090 transport: http description: MCP adapter for Orchestration Workflows. tools: - name: civitai-submit-workflow description: Submit an AI generation workflow. hints: { readOnly: false, destructive: false, idempotent: false } call: orchestration-workflows.submitworkflow with: { body: tools.body } outputParameters: [{ type: object, mapping: $. }] - name: civitai-get-workflow description: Get a workflow by ID. hints: { readOnly: true, destructive: false, idempotent: true } call: orchestration-workflows.getworkflow with: { workflowId: tools.workflowId } outputParameters: [{ type: object, mapping: $. }] - name: civitai-query-workflows description: Query workflows. hints: { readOnly: true, destructive: false, idempotent: true } call: orchestration-workflows.queryworkflows with: take: tools.take cursor: tools.cursor status: tools.status outputParameters: [{ type: object, mapping: $. }] - name: civitai-cancel-workflow description: Cancel/delete a workflow. hints: { readOnly: false, destructive: true, idempotent: true } call: orchestration-workflows.deleteworkflow with: { workflowId: tools.workflowId } outputParameters: [{ type: object, mapping: $. }]