{
  "openapi": "3.1.0",
  "info": {
    "title": "Orkas public API",
    "description": "Orkas official LLM, web search, speech, image, video, and connector services, callable from\nyour own application with an Orkas API key and your account's shared credit\nbalance.\n\nAuthentication: `Authorization: Bearer <ORKAS_API_KEY>`. Keys passed in the query\nstring are rejected. Each key carries scopes (`llm`, `search`, `speech`,\n`images`, `videos`, `connectors`); a request outside its key's scope is refused.\n\nUse `/v1/responses` for new integrations and reasoning with tools. Chat\nCompletions remains available. For `orkas-llm-1.5` Chat tool calls, Server sets\n`reasoning_effort: \"none\"` automatically; callers do not need to set it.\n\nImage and video generation are asynchronous: the POST returns a task id, and the\nmatching GET reports the task's status and result. Human-readable guides and\nrunnable examples: https://orkas.ai/api-docs/\n",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://orkas.ai"
    }
  ],
  "paths": {
    "/v1/openapi.json": {
      "get": {
        "summary": "Openapi Document",
        "description": "Machine-readable contract for the public surface.\n\nGenerated from the live router, so it cannot drift from the handlers the way\na hand-maintained spec would. The server origin comes from deployment config\nrather than the request Host header, so a forged Host cannot poison the\npublished document or its cache. Unauthenticated on purpose: an agent must be\nable to read the contract before it can hold a key.",
        "operationId": "openapi_document_v1_openapi_json_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      }
    },
    "/v1/chat/completions": {
      "post": {
        "summary": "Chat Completions",
        "description": "Chat Completions compatibility. Server disables reasoning for standard\nLuna tool calls automatically. Use /v1/responses for reasoning with tools.",
        "operationId": "chat_completions_v1_chat_completions_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "title": "Body"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/responses": {
      "post": {
        "summary": "Responses",
        "description": "Recommended native reasoning/tool protocol with the same API-key scope and ledger.",
        "operationId": "responses_v1_responses_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "title": "Body"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/search": {
      "post": {
        "summary": "Search",
        "operationId": "search_v1_search_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "title": "Body"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/audio/voices": {
      "get": {
        "summary": "Audio Voices",
        "operationId": "audio_voices_v1_audio_voices_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/audio/speech": {
      "post": {
        "summary": "Audio Speech",
        "operationId": "audio_speech_v1_audio_speech_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "title": "Body"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/audio/transcription_sessions": {
      "post": {
        "summary": "Audio Transcription Session",
        "description": "Exchange a speech-scoped key for one 30-second ASR connection ticket.\n\nConnect to `/api/voice/asr_ws?ticket=<ticket>&encoding=raw` (or gzip).\nAudio is mono 16 kHz signed 16-bit PCM; send `__END__` to finalize.\nTicket creation does not start recognition or charge credits.",
        "operationId": "audio_transcription_session_v1_audio_transcription_sessions_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "title": "Body"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/images/generations": {
      "post": {
        "summary": "Image Generations",
        "operationId": "image_generations_v1_images_generations_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "title": "Body"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/images/generations/{task_id}": {
      "get": {
        "summary": "Image Generation",
        "operationId": "image_generation_v1_images_generations__task_id__get",
        "parameters": [
          {
            "name": "task_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Task Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/videos": {
      "post": {
        "summary": "Videos",
        "operationId": "videos_v1_videos_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "title": "Body"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/videos/{task_id}": {
      "get": {
        "summary": "Video",
        "operationId": "video_v1_videos__task_id__get",
        "parameters": [
          {
            "name": "task_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Task Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          },
          "input": {
            "title": "Input"
          },
          "ctx": {
            "type": "object",
            "title": "Context"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      }
    },
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "Orkas API key, sent as `Authorization: Bearer <key>`. Create one in the Orkas account settings."
      }
    }
  }
}
