Goatlab API Docs

Get extracted metadata for a personal file

GET
/v1/files/{file_id}/metadata

Retrieves the extracted metadata for a specific personal file.

The response includes structured file-level fields extracted by the AI pipeline (summary, language, domain, documentKind) as well as any additional key-value metadata fields, returned as the tags array.

A 200 is returned even when extraction has not populated every field: absent file-level values are returned as null, and tags is an empty array when the file has no metadata. To check extraction progress, use the file status endpoint.

Authorization

ApiTokenAuth PRODUCT, GEN_AI
x-api-key<token>

API Key with role based permission

In: header

Scope: PRODUCT, GEN_AI

Path Parameters

file_id*string

The unique identifier of the file to retrieve metadata for

Header Parameters

x-user-id*string

The ID of the user requesting the metadata

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/files/497f6eca-6276-4993-bfeb-53cbbbba6f08/metadata" \  -H "x-user-id: string"
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "originalName": "document.pdf",
  "summary": "This document covers quarterly financial results for Q3 2025.",
  "language": "en",
  "documentKind": "Report",
  "domain": "Finance",
  "chunksCount": 12,
  "charactersCount": 15240,
  "tags": [
    {
      "key": "author",
      "value": "Jane Doe",
      "aiExtracted": true
    },
    {
      "key": "created_date",
      "value": "2025-09-30",
      "aiExtracted": true
    }
  ]
}

{
  "message": "x-user-id is required"
}

{
  "message": "Invalid API Key"
}
{
  "message": "Invalid API Key"
}
{
  "message": "File not found"
}
{
  "message": "Internal Server Error"
}