Sakura AI Engine RAG API (2025-09-24)

Download OpenAPI specification:Download

さくらのAI Engine RAG API

documents_list

Authorizations:
BearerAuth
query Parameters
model
string
name
string
page
integer

A page number within the paginated result set.

page_size
integer

Number of results to return per page.

tag
string

Responses

Response samples

Content type
application/json
{
  • "meta": {},
  • "results": [
    ]
}

documents_retrieve

Authorizations:
BearerAuth
path Parameters
id
required
string <uuid>

A UUID string identifying this document.

Responses

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "created_at": "2019-08-24T14:15:22Z",
  • "status": "pending",
  • "name": "string",
  • "model": "string",
  • "chunk_count": 0,
  • "tags": [
    ],
  • "content": "string",
  • "error_message": "string"
}

documents_update

Authorizations:
BearerAuth
path Parameters
id
required
string <uuid>

A UUID string identifying this document.

Request Body schema: application/json
name
required
string <= 255 characters
tags
Array of strings

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "tags": [
    ]
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "created_at": "2019-08-24T14:15:22Z",
  • "status": "pending",
  • "name": "string",
  • "model": "string",
  • "chunk_count": 0,
  • "tags": [
    ],
  • "content": "string",
  • "error_message": "string"
}

documents_destroy

Authorizations:
BearerAuth
path Parameters
id
required
string <uuid>

A UUID string identifying this document.

Responses

chunks

document_chunks_list

ドキュメント配下のチャンク一覧/単体取得用 ViewSet。

  • list: /documents/{document_id}/chunks/
  • retrieve: /documents/{document_id}/chunks/{index}/ ← index で取得
Authorizations:
BearerAuth
path Parameters
document_pk
required
string
query Parameters
page
integer

A page number within the paginated result set.

page_size
integer

Number of results to return per page.

Responses

Response samples

Content type
application/json
{
  • "meta": {},
  • "results": [
    ]
}

document_chunks_retrieve

ドキュメント配下のチャンク一覧/単体取得用 ViewSet。

  • list: /documents/{document_id}/chunks/
  • retrieve: /documents/{document_id}/chunks/{index}/ ← index で取得
Authorizations:
BearerAuth
path Parameters
document_pk
required
string
index
required
string^\d+$

Responses

Response samples

Content type
application/json
{
  • "document": {
    },
  • "chunk_index": 0,
  • "content": "string",
  • "metadata": "string"
}

chat

documents_chat

Authorizations:
BearerAuth

Responses

Response samples

Content type
application/json
{
  • "answer": "string",
  • "sources": [
    ]
}

query

documents_query

Authorizations:
BearerAuth
query Parameters
model
string
name
string
tag
string
Request Body schema: application/json
model
string <= 255 characters
Default: "multilingual-e5-large"
query
required
string <= 1000 characters
tags
Array of strings[ items <= 255 characters ]
top_k
integer [ 1 .. 100 ]
Default: 3
threshold
number <double> [ 0 .. 1 ]
Default: 0.3

Responses

Request samples

Content type
application/json
{
  • "model": "multilingual-e5-large",
  • "query": "string",
  • "tags": [
    ],
  • "top_k": 3,
  • "threshold": 0.3
}

Response samples

Content type
application/json
{
  • "results": [
    ]
}

upload

documents_upload

Authorizations:
BearerAuth
Request Body schema:
file
required
string <uri>
name
string <= 255 characters
tags
Array of strings
model
string (ModelEnum)
Value: "multilingual-e5-large"
  • multilingual-e5-large - multilingual-e5-large

Responses

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "status": "pending",
  • "content": "string",
  • "name": "string",
  • "tags": [
    ],
  • "model": "multilingual-e5-large"
}