generated: '2026-08-14' method: searched source: https://docs.lang.ai/ checked: '2026-08-14' summary: >- Request and response examples transcribed verbatim from the published Lang.ai API reference at https://docs.lang.ai/ — one pair per documented operation. Lang.ai publishes no machine-readable specification, so these are the only authoritative payload shapes it ships. Values shown are the provider's own documentation placeholders (project_id, YOUR_TOKEN, "The text to be analyzed"); they are not live credentials and not synthetic inventions by this pipeline. spec: openapi/_original/langai-api-openapi.yml examples: - operationId: createProject summary: Create a project from a CSV dataset (multipart/related, RFC 2387) request: method: POST url: https://company.lang.ai/api/v1/project headers: Content-Type: 'multipart/related; boundary={boundary_string}' Authorization: 'Bearer API_TOKEN' Content-Length: '392' body_note: >- Two parts. The metadata part MUST come first with Content-Type "application/json; charset=UTF-8"; the media part MUST come second with Content-Type text/plain or text/csv. Each part is preceded by the boundary string with two leading hyphens; the final boundary carries two trailing hyphens. body: | --{boundary_string} Content-Type: application/json; charset=UTF-8 { "name": "My test project", "csvOptions": {"textColumn": "csv_text_column", "dateColumn": "csv_date_column"}, "team_ids": ["team_id_one", "team_id_two"] } --{boundary_string} Content-Type: text/csv csv_text_column,csv_date_column,metadata_column,another_metadata First text,2018-04-25,my metadata,lorem Second text,2018-04-25,another metadata,ipsum --{boundary_string}-- response: status: 200 content_type: application/json body: id: project_id - operationId: listProjects summary: List every project on the instance request: method: GET url: https://company.lang.ai/api/v1/projects headers: Authorization: 'Bearer API_TOKEN' body: null body_note: The request does not require a JSON body. response: status: 200 content_type: application/json body: - status: Processing id: sWP2ll1v16lLdMxM name: My first project createdAt: '2021-03-22T13:54:55Z' - status: Completed id: l3wNMwIXM1S046Sy name: My second project createdAt: '2021-03-23T13:54:55Z' - operationId: getProjectTags summary: Get a project and the tags defined on it request: method: GET url: https://company.lang.ai/api/v1/projects/l3wNMwIXM1S046Sy headers: Authorization: 'Bearer API_TOKEN' body: null body_note: The request does not require a JSON body. response: status: 200 content_type: application/json body: status: Completed id: l3wNMwIXM1S046Sy name: My second project createdAt: '2021-03-23T13:54:55Z' tags: - id: tqGMbCpTBZOJaram name: My first tag createdAt: '2021-04-21T12:40:50.892265Z' updatedAt: '2021-04-25T11:35:43.512464Z' isDraft: false - operationId: analyzeDocument summary: Classify a document without persisting it request: method: POST url: https://company.lang.ai/api/v1/analyze headers: Authorization: 'Bearer YOUR_TOKEN' Content-Type: application/json body: text: The text to be analyzed projectId: Your project id curl: | curl https://company.lang.ai/api/v1/analyze \ -H "Authorization: Bearer YOUR_TOKEN" \ -H "Content-Type: application/json" \ -X POST -d '{"text": "The Text", "projectId": "YOUR_PROJECT_ID"}' response: status: 200 content_type: application/json body: tags: - id: tqGMbCpTBZOJaram name: My first tag intents: - name: intent features: - feature - feature>feature note: >- The ">" sign inside a feature string marks a second-level feature. - operationId: saveDocument summary: Save a document with metadata and a stable client-supplied id request: method: POST url: https://company.lang.ai/api/v1/documents headers: Authorization: 'Bearer API_TOKEN' Content-Type: application/json body: text: The text to be analyzed projectId: Your project id metadata: key: value another_key: value date: '2019-20-12' id: The ID of the document to save. body_note: >- metadata, date and id are all optional. `date` accepts valid ISO 8601 dates and defaults to the request time. Supplying an `id` that already exists OVERWRITES the stored document, which is what makes a retry of this operation safe. The literal "2019-20-12" above is the provider's own example string and is not a valid ISO 8601 date — transcribed as published. response: status: 200 content_type: application/json body: tags: - id: tqGMbCpTBZOJaram name: My first tag intents: - name: intent features: - feature - feature>feature error_examples: note: >- Lang.ai publishes an HTTP status table but no example error body and no field-level error schema, so no error payload can be transcribed. See errors/langai-problem-types.yml for the status catalog. statuses: [400, 401, 404, 429, 500]