PATCH
/
agent
/
{uuid}
/
embed
curl --request PATCH \
  --url https://geekai.dev/api/v1/agent/{uuid}/embed \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form 'embed_files=[
  "/E:/Documents/file.pdf"
]'
{
  "message": "File uploaded successfully, processing in progress.",
  "data": {
    "task_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "status": "pending",
    "progress": 50
  }
}

You can add training files (supports batch uploading) to a specified agent for training through the agent training interface. The response data is the same as creating an agent, omitted here.

cURL Request Example

curl --location --request PATCH 'https://geekai.dev/api/v1/agent/be9062c1-68d5-48ee-b74e-fab6d864bc29/embed' \
--header 'Authorization: Bearer {YOUR_GEEKAI_API_KEY}' \
--form 'embed_files=@"/E:/Documents/GeekAI/Training File1.txt"' \
--form 'embed_files=@"/E:/Documents/GeekAI/Training File2.txt"' \
--form 'embed_files=@"/E:/Documents/GeekAI/Training File3.txt"'

Authorizations

Authorization
string
header
required

token

Path Parameters

uuid
string
required

uuid

Body

multipart/form-data

Response

200
application/json

successful response

The response is of type object.