openapi: 3.2.0 info: title: Sakura Internet Query API version: '2026-06-29' description: 'Operations tagged query across 2 of this provider''s published API definitions: ai-engine-rag-api.yaml, sakura-internet-ai-engine-rag-openapi.yml. Each path carries the servers of the definition it was published in.' servers: - url: ' https://api.ai.sakura.ad.jp' tags: - name: Query paths: /v1/documents/query/: post: operationId: documents_query parameters: - in: query name: model schema: type: string - in: query name: name schema: type: string - in: query name: tag schema: type: string tags: - Query requestBody: content: application/json: schema: $ref: '#/components/schemas/QueryRequest' required: true security: - BearerAuth: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/PaginatedQueryResultChunkList' description: '' summary: Documents query x-summary-source: derived servers: - url: ' https://api.ai.sakura.ad.jp' components: schemas: QueryRequest: type: object properties: model: type: string default: multilingual-e5-large description: クエリのベクトル化に利用するモデル。 maxLength: 255 query: type: string maxLength: 1000 tags: type: array items: type: string maxLength: 255 description: すべてのタグを持つドキュメントのみ対象。 top_k: type: integer maximum: 100 minimum: 1 default: 3 description: 返す検索結果の最大件数。 threshold: type: number format: double maximum: 2.0 minimum: 0.0 default: 0.3 description: ベクトル距離のしきい値。この值よりも距離が大きいドキュメントは検索結果から除外されます。 distance_type: allOf: - $ref: '#/components/schemas/DistanceTypeEnum' default: cosine description: '類似度計算に使用する距離メトリクスです。 * `cosine`: コサイン距離。テキストの類似度測定に適しており、値の範囲は0〜2(0が完全に一致)です。 * `l2`: L2距離(ユークリッド距離)。ベクトル空間での直線距離で、数値データの類似度測定に適しています。値の範囲は0〜2(0が完全に一致)です。 * `cosine` - cosine * `l2` - l2' required: - query DistanceTypeEnum: enum: - cosine - l2 type: string description: '* `cosine` - cosine * `l2` - l2' PaginatedQueryResultChunkList: type: object properties: results: type: array items: $ref: '#/components/schemas/QueryResultChunk' required: - results StatusEnum: enum: - pending - processing - available - deleted - error type: string description: '* `pending` - Pending * `processing` - Processing * `available` - Available * `deleted` - Deleted * `error` - Error' QueryResultChunk: type: object properties: document: allOf: - $ref: '#/components/schemas/DocumentList' readOnly: true chunk_index: type: integer readOnly: true distance: type: number format: double readOnly: true content: type: string readOnly: true metadata: type: object additionalProperties: {} readOnly: true required: - chunk_index - content - distance - document - metadata DocumentList: type: object properties: id: type: string format: uuid readOnly: true created_at: type: string format: date-time readOnly: true status: allOf: - $ref: '#/components/schemas/StatusEnum' readOnly: true title: ステータス name: type: string maxLength: 255 model: type: string readOnly: true chunk_size: type: integer readOnly: true chunk_count: type: integer readOnly: true tags: type: array items: type: string error_message: type: string readOnly: true required: - chunk_count - chunk_size - created_at - error_message - id - model - name - status securitySchemes: BearerAuth: type: http scheme: bearer x-refined-from: - ai-engine-rag-api.yaml - sakura-internet-ai-engine-rag-openapi.yml