Captions Endpoints¶
Captions API endpoints.
Overview¶
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/v1/captions/image |
Caption Image |
| POST | /api/v1/captions/product/{id} |
Caption Product |
API Reference¶
Sartiq Backend Server - Captions 0.1.0¶
captions¶
POST /api/v1/captions/image¶
Caption Image
Description
Caption any image with configurable preset and instructions.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
OAuth2PasswordBearer |
header | string | N/A | No |
Request body
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.
Schema of the request body
{
"properties": {
"image_url": {
"type": "string",
"title": "Image Url"
},
"preset": {
"$ref": "#/components/schemas/CaptionPromptPreset",
"default": "garment"
},
"extra_prompt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Extra Prompt"
}
},
"type": "object",
"required": [
"image_url"
],
"title": "CaptionImageRequest",
"description": "Request schema for captioning any image with configurable preset and instructions.\n\nSupported image_url formats:\n- HTTP/HTTPS URLs: https://example.com/image.jpg\n- Base64 data URLs: data:image/jpeg;base64,/9j/4AAQSkZJRg...\n- Local file paths (internal use only): /path/to/image.jpg\n\nNote: Base64 images are processed entirely in-memory with no disk I/O."
}
Responses
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.
POST /api/v1/captions/product/{id}¶
Caption Product
Description
Generate caption for product using its cover image (via compute server).
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
OAuth2PasswordBearer |
header | string | N/A | No | |
id |
path | string | No |
Request body
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.
Schema of the request body
{
"properties": {
"preset": {
"$ref": "#/components/schemas/CaptionPromptPreset",
"default": "garment"
},
"extra_prompt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Extra Prompt"
},
"update_product": {
"type": "boolean",
"title": "Update Product",
"default": false
}
},
"type": "object",
"title": "CaptionProductRequest",
"description": "Request schema for captioning a product using its cover image."
}
Responses
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.
Schemas¶
CaptionImageRequest¶
| Name | Type | Description |
|---|---|---|
extra_prompt |
||
image_url |
string | |
preset |
CaptionPromptPreset |
CaptionProductRequest¶
| Name | Type | Description |
|---|---|---|
extra_prompt |
||
preset |
CaptionPromptPreset | |
update_product |
boolean |
CaptionPromptPreset¶
Type: string
HTTPValidationError¶
| Name | Type | Description |
|---|---|---|
detail |
Array<ValidationError> |
ValidationError¶
| Name | Type | Description |
|---|---|---|
ctx |
||
input |
||
loc |
Array<> | |
msg |
string | |
type |
string |
Security schemes¶
| Name | Type | Scheme | Description |
|---|---|---|---|
| OAuth2PasswordBearer | oauth2 |