API ReferenceDeployments
Examples
Manage extraction examples for a deployment
List Examples
GET
/api/v1/deployments/{deploymentId}/examplesReturns all files in the example pool for a deployment. Examples are used to improve extraction accuracy through few-shot learning.
Parameters
| Name | Type | In | Required | Description |
|---|---|---|---|---|
deploymentId | string | path | Yes | The deployment ID |
pinned | string | query | No | Filter by pinned status: true or false |
Request
const res = await fetch(
"https://app.limai.io/api/v1/deployments/dep_abc123/examples?pinned=true",
{
headers: {
Authorization: "Bearer YOUR_API_TOKEN",
},
}
);
const { data, summary } = await res.json();Response
Response200
{
"data": [
{
"id": "file_001",
"name": "sample_invoice.pdf",
"isPinned": true,
"description": "Standard invoice with line items",
"isConfirmed": true
}
],
"summary": {
"total": 5,
"pinnedCount": 2,
"withDescriptionCount": 3
}
}Update Example Description
PATCH
/api/v1/deployments/{deploymentId}/examples/{fileId}/descriptionUpdate or clear the description of an example file. Descriptions help the extraction model understand what kind of document the example represents.
Parameters
| Name | Type | In | Required | Description |
|---|---|---|---|---|
deploymentId | string | path | Yes | The deployment ID |
fileId | string | path | Yes | The example file ID |
description | string | null | body | Yes | Description text (max 500 chars) or null to clear |
Request
const res = await fetch(
"https://app.limai.io/api/v1/deployments/dep_abc123/examples/file_001/description",
{
method: "PATCH",
headers: {
Authorization: "Bearer YOUR_API_TOKEN",
"Content-Type": "application/json",
},
body: JSON.stringify({
description: "Standard invoice with line items and tax breakdown",
}),
}
);Response
Response200
{
"success": true,
"description": "Standard invoice with line items and tax breakdown"
}Toggle Example Pin
PATCH
/api/v1/deployments/{deploymentId}/examples/{fileId}/pinPin or unpin an example file. Pinned examples are always included in extraction prompts.
Parameters
| Name | Type | In | Required | Description |
|---|---|---|---|---|
deploymentId | string | path | Yes | The deployment ID |
fileId | string | path | Yes | The example file ID |
pinned | boolean | body | No | Set pin state. Omit to toggle. |
Request
const res = await fetch(
"https://app.limai.io/api/v1/deployments/dep_abc123/examples/file_001/pin",
{
method: "PATCH",
headers: {
Authorization: "Bearer YOUR_API_TOKEN",
"Content-Type": "application/json",
},
body: JSON.stringify({ pinned: true }),
}
);Response
Response200
{
"success": true,
"isPinned": true
}