Skip to content

Commit 6f6328d

Browse files
committed
update api
1 parent 0613a79 commit 6f6328d

File tree

2 files changed

+59
-1
lines changed

2 files changed

+59
-1
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
id: image-to-text-api-image-2-text-v1-post
3+
title: "Convert Image to Text"
4+
description: "Process an image and generate descriptive text based on its content."
5+
sidebar_label: "Convert Image to Text"
6+
hide_title: true
7+
hide_table_of_contents: true
8+
api: {"tags":["Image-to-Text"],"description":"Process an image and generate descriptive text based on its content.","operationId":"image_to_text_api_image_2_text_v1_post","requestBody":{"content":{"application/json":{"schema":{"properties":{"image_url":{"type":"string","title":"Image URL","description":"URL of the image to be processed"},"prompt_type":{"type":"string","title":"Prompt Type","description":"Type of analysis to perform","enum":["Other","Product","Scene"]},"custom_prompt":{"type":"string","title":"Custom Prompt","description":"Custom instructions for text generation"}},"type":"object","required":["image_url","prompt_type"],"title":"ImageToTextRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"text":{"type":"string","title":"Text","description":"Generated text description of the image"}},"type":"object","required":["text"],"title":"ImageToTextResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}],"method":"post","path":"/image-2-text-v1","servers":[{"url":"https://api.wordlift.io","description":"WordLift Image-to-Text API"}],"securitySchemes":{"APIKeyHeader":{"type":"apiKey","in":"header","name":"authorization"}},"jsonRequestBodyExample":{"image_url":"https://example.com/path/to/image.jpg","prompt_type":"Other","custom_prompt":"Generate concise and descriptive text for the image"},"info":{"title":"WordLift Image-to-Text API","description":"API for converting images into text descriptions using AI technology.","version":"1.0.0"},"postman":{"name":"Convert Image to Text","description":{"content":"Process an image and generate descriptive text based on its content.","type":"text/plain"},"url":{"path":["image-2-text-v1"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}},"auth":{"type":"apikey","apikey":[{"type":"any","value":"authorization","key":"key"},{"type":"any","value":"<API Key>","key":"value"},{"type":"any","value":"header","key":"in"}]}}}
9+
sidebar_class_name: "post api-method"
10+
info_path: api/image-to-text/wordlift-image-to-text-api
11+
custom_edit_url: null
12+
---
13+
14+
import ApiTabs from "@theme/ApiTabs";
15+
import MimeTabs from "@theme/MimeTabs";
16+
import ParamsItem from "@theme/ParamsItem";
17+
import ResponseSamples from "@theme/ResponseSamples";
18+
import SchemaItem from "@theme/SchemaItem";
19+
import SchemaTabs from "@theme/SchemaTabs";
20+
import DiscriminatorTabs from "@theme/DiscriminatorTabs";
21+
import TabItem from "@theme/TabItem";
22+
23+
## Convert Image to Text
24+
25+
Process an image and generate descriptive text based on its content.
26+
27+
<MimeTabs><TabItem label={"application/json"} value={"application/json-schema"}><details style={{}} data-collapsed={false} open={true}><summary style={{"textAlign":"left"}}><strong>Request Body</strong><strong style={{"fontSize":"var(--ifm-code-font-size)","color":"var(--openapi-required)"}}> required</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"image_url"} required={true} schemaName={"Image URL"} qualifierMessage={undefined} schema={{"type":"string","title":"Image URL","description":"URL of the image to be processed"}}></SchemaItem><SchemaItem collapsible={false} name={"prompt_type"} required={true} schemaName={"Prompt Type"} qualifierMessage={"possible values: Other, Product, Scene"} schema={{"type":"string","title":"Prompt Type","description":"Type of analysis to perform","enum":["Other","Product","Scene"]}}></SchemaItem><SchemaItem collapsible={false} name={"custom_prompt"} required={false} schemaName={"Custom Prompt"} qualifierMessage={undefined} schema={{"type":"string","title":"Custom Prompt","description":"Custom instructions for text generation"}}></SchemaItem></ul></details></TabItem></MimeTabs><div><ApiTabs><TabItem label={"200"} value={"200"}><div>
28+
29+
Successful Response
30+
31+
</div><div><MimeTabs schemaType={"response"}><TabItem label={"application/json"} value={"application/json"}><SchemaTabs><TabItem label={"Schema"} value={"Schema"}><details style={{}} data-collapsed={false} open={true}><summary style={{"textAlign":"left"}}><strong>Schema</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"text"} required={true} schemaName={"Text"} qualifierMessage={undefined} schema={{"type":"string","title":"Text","description":"Generated text description of the image"}}></SchemaItem></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"{\n \"text\": \"A healthcare professional conducting a remote eye examination via video call, helping a patient access eyecare services remotely.\"\n}"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem><TabItem label={"422"} value={"422"}><div>
32+
33+
Validation Error
34+
35+
</div><div><MimeTabs schemaType={"response"}><TabItem label={"application/json"} value={"application/json"}><SchemaTabs><TabItem label={"Schema"} value={"Schema"}><details style={{}} data-collapsed={false} open={true}><summary style={{"textAlign":"left"}}><strong>Schema</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={true} className={"schemaItem"}><details style={{}}><summary style={{}}><strong>detail</strong><span style={{"opacity":"0.6"}}> object[]</span></summary><div style={{"marginLeft":"1rem"}}><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem","paddingBottom":".5rem"}}>Array [</div></li><SchemaItem collapsible={true} className={"schemaItem"}><details style={{}}><summary style={{}}><strong>loc</strong><span style={{"opacity":"0.6"}}> object[]</span><strong style={{"fontSize":"var(--ifm-code-font-size)","color":"var(--openapi-required)"}}> required</strong></summary><div style={{"marginLeft":"1rem"}}><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem","paddingBottom":".5rem"}}>Array [</div></li><div><span className={"badge badge--info"}>anyOf</span><SchemaTabs><TabItem label={"MOD1"} value={"0-item-properties"}><div style={{"marginTop":".5rem","marginBottom":".5rem","marginLeft":"1rem"}}>
36+
37+
string
38+
39+
</div></TabItem><TabItem label={"MOD2"} value={"1-item-properties"}><div style={{"marginTop":".5rem","marginBottom":".5rem","marginLeft":"1rem"}}>
40+
41+
integer
42+
43+
</div></TabItem></SchemaTabs></div><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem"}}>]</div></li></div></details></SchemaItem><SchemaItem collapsible={false} name={"msg"} required={true} schemaName={"Message"} qualifierMessage={undefined} schema={{"type":"string","title":"Message"}}></SchemaItem><SchemaItem collapsible={false} name={"type"} required={true} schemaName={"Error Type"} qualifierMessage={undefined} schema={{"type":"string","title":"Error Type"}}></SchemaItem><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem"}}>]</div></li></div></details></SchemaItem></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"{\n \"detail\": [\n {\n \"loc\": [\n \"string\",\n 0\n ],\n \"msg\": \"string\",\n \"type\": \"string\"\n }\n ]\n}"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem></ApiTabs></div>

docs/api/image-to-text/sidebar.js

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
11
module.exports = [
2-
"wordlift-image-to-text-api",
2+
{
3+
"type": "doc",
4+
"id": "api/image-to-text/wordlift-image-to-text-api"
5+
},
6+
{
7+
"type": "category",
8+
"label": "Image-to-Text",
9+
"items": [
10+
{
11+
"type": "doc",
12+
"id": "api/image-to-text/image-to-text-api-image-2-text-v1-post",
13+
"label": "Convert Image to Text",
14+
"className": "api-method post"
15+
}
16+
]
17+
}
318
];

0 commit comments

Comments
 (0)