openapi: 3.1.0 info: title: Borminto API Army version: 2026-12-03 description: >- OpenAI-compatible chat completions through the groups you build. An application key can use every group; a group key always uses its own group. Full guide: https://docs.borminto.com/api-army/routing servers: - url: https://borminto.com/api/v1 security: - armyKey: [] paths: /models: get: summary: List models description: Each model once, with the groups that serve it. With a group key, only that group's models. parameters: - name: group in: query required: false schema: { type: string, example: openai-team } responses: '200': description: Models content: application/json: schema: type: object properties: object: { type: string, const: list } data: { type: array, items: { $ref: '#/components/schemas/Model' } } '401': { $ref: '#/components/responses/Error' } '404': { $ref: '#/components/responses/Error' } /chat/completions: post: summary: Create a chat completion requestBody: required: true content: application/json: schema: { $ref: '#/components/schemas/ChatRequest' } responses: '200': description: The completion, or Server-Sent Events when stream is true headers: X-Request-ID: { schema: { type: string, format: uuid } } content: application/json: schema: { $ref: '#/components/schemas/ChatCompletion' } text/event-stream: schema: { type: string, description: 'chat.completion.chunk events, then data: [DONE]' } '400': { $ref: '#/components/responses/Error' } '401': { $ref: '#/components/responses/Error' } '404': { $ref: '#/components/responses/Error' } '429': { $ref: '#/components/responses/Error' } '502': { $ref: '#/components/responses/Error' } '503': { $ref: '#/components/responses/Error' } /key: get: summary: Key limits and usage responses: '200': description: Limits and this month's usage of the key's application or group content: application/json: schema: type: object properties: data: type: object properties: application: { type: string } group: { type: [string, 'null'] } is_enabled: { type: boolean } limits: type: object properties: requests_per_minute: { type: [integer, 'null'] } concurrent_requests: { type: [integer, 'null'] } monthly_tokens: { type: [integer, 'null'] } usage: type: object properties: requests_last_minute: { type: integer } running_requests: { type: integer } monthly_tokens_used: { type: integer } monthly_tokens_reserved: { type: integer } monthly_tokens_remaining: { type: [integer, 'null'] } resets_at: { type: string, format: date-time } '401': { $ref: '#/components/responses/Error' } /generation: get: summary: Request details parameters: - name: id in: query required: true schema: { type: string, example: gen-a8dac3f8-1ee6-4685-ac1d-81a8a21d8f08 } responses: '200': description: One request with every source it tried content: application/json: schema: type: object properties: data: type: object properties: id: { type: string } model: { type: string } group: { type: [string, 'null'] } provider: { type: [string, 'null'] } status: { type: [integer, 'null'] } error_code: { type: [string, 'null'] } tokens: type: object properties: input: { type: [integer, 'null'] } output: { type: [integer, 'null'] } total: { type: [integer, 'null'] } duration_ms: { type: [integer, 'null'] } created_at: { type: [string, 'null'], format: date-time } finished_at: { type: [string, 'null'], format: date-time } attempts: type: array items: type: object properties: provider: { type: [string, 'null'] } status: { type: [integer, 'null'] } error_code: { type: [string, 'null'] } duration_ms: { type: [integer, 'null'] } total_tokens: { type: [integer, 'null'] } '400': { $ref: '#/components/responses/Error' } '401': { $ref: '#/components/responses/Error' } '404': { $ref: '#/components/responses/Error' } components: securitySchemes: armyKey: type: http scheme: bearer description: An application key or a group key. Both start with army_. responses: Error: description: Error content: application/json: schema: type: object properties: error: type: object properties: message: { type: string } type: { type: string } code: type: string examples: [invalid_request, unsupported_content, tools_unsupported, group_mismatch, invalid_api_key, model_not_found, group_not_found, no_provider, rate_limited, group_disabled] schemas: Model: type: object properties: id: { type: string, example: openai/gpt-6.2-sol } object: { type: string, const: model } created: { type: integer } owned_by: { type: string, example: openai } groups: { type: array, items: { type: string } } sources: { type: integer } service_tiers: { type: array, items: { type: string } } Message: type: object required: [role] properties: role: { type: string, enum: [system, developer, user, assistant, tool] } content: oneOf: - { type: string } - type: array items: type: object properties: type: { type: string, const: text } text: { type: string } - { type: 'null' } tool_calls: { type: array, items: { $ref: '#/components/schemas/ToolCall' } } tool_call_id: { type: string } ToolCall: type: object properties: id: { type: string } type: { type: string, const: function } function: type: object properties: name: { type: string } arguments: { type: string } ChatRequest: type: object required: [messages] properties: model: { type: string, description: Required unless models is sent., example: openai/gpt-6.2-sol } models: { type: array, maxItems: 5, items: { type: string } } group: { type: string, description: A group's API name. Not needed with a group key. } provider: type: object properties: only: { type: array, items: { type: string } } ignore: { type: array, items: { type: string } } order: { type: array, items: { type: string } } allow_fallbacks: { type: boolean, default: true } messages: { type: array, minItems: 1, maxItems: 256, items: { $ref: '#/components/schemas/Message' } } stream: { type: boolean } stream_options: type: object properties: include_usage: { type: boolean } tools: type: array maxItems: 64 items: type: object properties: type: { type: string, const: function } function: type: object properties: name: { type: string } description: { type: string } parameters: { type: object } tool_choice: {} parallel_tool_calls: { type: boolean } max_tokens: { type: integer, minimum: 16, maximum: 32768 } max_completion_tokens: { type: integer, minimum: 16, maximum: 32768 } temperature: { type: number, minimum: 0, maximum: 2 } top_p: { type: number, minimum: 0, maximum: 1 } stop: {} seed: { type: integer } presence_penalty: { type: number } frequency_penalty: { type: number } response_format: { type: object } service_tier: { type: string, enum: [default, auto, priority] } ChatCompletion: type: object properties: id: { type: string, example: gen-a8dac3f8-1ee6-4685-ac1d-81a8a21d8f08 } object: { type: string, const: chat.completion } created: { type: integer } model: { type: string } group: { type: [string, 'null'] } provider: { type: [string, 'null'] } choices: type: array items: type: object properties: index: { type: integer } message: type: object properties: role: { type: string, const: assistant } content: { type: [string, 'null'] } tool_calls: { type: array, items: { $ref: '#/components/schemas/ToolCall' } } finish_reason: { type: string, enum: [stop, length, tool_calls, content_filter] } usage: type: object properties: prompt_tokens: { type: integer } completion_tokens: { type: integer } total_tokens: { type: integer }