naftiko: 1.0.0-alpha2 info: label: OpenAI Batch — Batch description: 'OpenAI Batch — Batch. Self-contained Naftiko capability for asynchronous request processing with a 50% cost discount across /v1/responses, /v1/chat/completions, /v1/embeddings, /v1/completions, and /v1/moderations endpoints.' tags: - Openai - Batch - Async created: '2026-05-22' modified: '2026-05-22' binds: - namespace: env keys: OPENAI_API_KEY: OPENAI_API_KEY capability: consumes: - type: http namespace: batch-batch baseUri: https://api.openai.com/v1 description: OpenAI Batch business capability. resources: - name: batches path: /batches operations: - name: createbatch method: POST description: Create a new batch from an uploaded JSONL input file. outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object required: true - name: listbatches method: GET description: List batches. outputRawFormat: json outputParameters: - name: result type: object value: $. - name: batch path: /batches/{batch_id} operations: - name: getbatch method: GET description: Retrieve a batch by ID. outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: batch_id in: path type: string required: true - name: batch-cancel path: /batches/{batch_id}/cancel operations: - name: cancelbatch method: POST description: Cancel an in-progress batch. outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: batch_id in: path type: string required: true authentication: type: bearer token: '{{env.OPENAI_API_KEY}}' exposes: - type: rest namespace: batch-batch-rest port: 8080 description: REST adapter for OpenAI Batch. resources: - path: /v1/batches name: batches operations: - method: POST name: createbatch description: Create a new batch. call: batch-batch.createbatch with: body: rest.body outputParameters: - type: object mapping: $. - method: GET name: listbatches description: List batches. call: batch-batch.listbatches outputParameters: - type: object mapping: $. - type: mcp namespace: batch-batch-mcp port: 9090 transport: http description: MCP adapter for OpenAI Batch. tools: - name: openai-create-batch description: Submit a batch of async requests for 50% discounted processing within 24 hours. hints: readOnly: false destructive: false idempotent: false call: batch-batch.createbatch with: body: tools.body outputParameters: - type: object mapping: $. - name: openai-get-batch description: Retrieve a batch by ID to poll its status. hints: readOnly: true destructive: false idempotent: true call: batch-batch.getbatch with: batch_id: tools.batch_id outputParameters: - type: object mapping: $. - name: openai-cancel-batch description: Cancel an in-progress batch. hints: readOnly: false destructive: true idempotent: true call: batch-batch.cancelbatch with: batch_id: tools.batch_id outputParameters: - type: object mapping: $.