---
updatedAt: 2025-09-02T07:17:19.000Z
agentTools:
  projectIndex: https://jamaibase.readme.io/llms.txt
---

# Embed a file into a knowledge table.

Permissions: `organization.MEMBER` OR `project.MEMBER`.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "JamAI Base API",
    "license": {
      "name": "Apache 2.0",
      "url": "https://www.apache.org/licenses/LICENSE-2.0.html"
    },
    "version": "0.1.0",
    "x-logo": {
      "url": "https://www.jamaibase.com/favicon.svg"
    }
  },
  "servers": [
    {
      "url": "https://api.jamaibase.com"
    }
  ],
  "paths": {
    "/api/v1/gen_tables/knowledge/embed_file": {
      "post": {
        "tags": [
          "Generative Table (V1)"
        ],
        "summary": "Embed a file into a knowledge table.",
        "description": "Permissions: `organization.MEMBER` OR `project.MEMBER`.",
        "operationId": "embed_file_api_v1_gen_tables_knowledge_embed_file_post",
        "deprecated": true,
        "parameters": [
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "description": "User PAT or service key.",
              "title": "Authorization"
            },
            "description": "User PAT or service key."
          },
          {
            "name": "X-USER-ID",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "description": "User ID. Can be omitted if PAT is used as token.",
              "default": "",
              "title": "X-User-Id"
            },
            "description": "User ID. Can be omitted if PAT is used as token."
          },
          {
            "name": "X-PROJECT-ID",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Project ID. Can be omitted if PAT is used as token.",
              "default": "",
              "title": "X-Project-Id"
            },
            "description": "Project ID. Can be omitted if PAT is used as token."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/FileEmbedFormData"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "FileEmbedFormData": {
        "properties": {
          "file": {
            "type": "string",
            "format": "binary",
            "title": "File",
            "description": "The file."
          },
          "file_name": {
            "type": "string",
            "title": "File Name",
            "description": "File name.",
            "default": "",
            "deprecated": true
          },
          "table_id": {
            "type": "string",
            "title": "Table Id",
            "description": "Knowledge Table ID."
          },
          "chunk_size": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "title": "Chunk Size",
            "description": "Maximum chunk size (number of characters). Must be > 0.",
            "default": 2000
          },
          "chunk_overlap": {
            "type": "integer",
            "minimum": 0,
            "title": "Chunk Overlap",
            "description": "Overlap in characters between chunks. Must be >= 0.",
            "default": 200
          }
        },
        "type": "object",
        "required": [
          "file",
          "table_id"
        ],
        "title": "FileEmbedFormData"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "OkResponse": {
        "properties": {
          "ok": {
            "type": "boolean",
            "title": "Ok",
            "default": true
          },
          "progress_key": {
            "type": "string",
            "title": "Progress Key",
            "default": ""
          }
        },
        "type": "object",
        "title": "OkResponse"
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      }
    },
    "securitySchemes": {
      "Authentication": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  },
  "security": [
    {
      "Authentication": []
    }
  ]
}
```