API reference

API reference · Playground

Add a document to a project

POST/api/conversations/folders/{id}/documentsSigned in session

The text the browser read from a file (the bytes never reach the server). At most 5 documents and 60000 characters a project.

Parameters

Path and query parameters
FieldTypeWhat it is
id (path)requiredintegerThe project (folder) id.

Request body

application/json, required

Request body fields
FieldTypeWhat it is
namerequiredstring
kindrequiredstring
textrequiredstring

Example

{
  "name": "string",
  "kind": "string",
  "text": "string"
}

Answer 201

Added.

Fields of the 201 answer
FieldTypeWhat it is
documentobject

Errors

  • 400OpenAI shaped error.
  • 401OpenAI shaped error.
  • 404OpenAI shaped error.
  • 409OpenAI shaped error.
  • 429OpenAI shaped error.

Every error answers in one shape, with its type, code and the field it names. The whole list is in the docs' Errors section.

Antimatter