Upload Image
curl --request POST \
--url https://api.landing.ai/v1/projects/{project_id}/images \
--header 'Content-Type: multipart/form-data' \
--form file='@example-file' \
--form 'name=<string>' \
--form 'label=<string>' \
--form 'tags=<string>' \
--form nothing_to_label=false \
--form 'metadata=<string>' \
--form label.0='@example-file'import requests
url = "https://api.landing.ai/v1/projects/{project_id}/images"
files = {
"file": ("example-file", open("example-file", "rb")),
"label.0": ("example-file", open("example-file", "rb"))
}
payload = {
"name": "<string>",
"label": "<string>",
"tags": "<string>",
"nothing_to_label": "false",
"metadata": "<string>"
}
response = requests.post(url, data=payload, files=files)
print(response.text)const form = new FormData();
form.append('file', '<string>');
form.append('name', '<string>');
form.append('label', '<string>');
form.append('tags', '<string>');
form.append('nothing_to_label', 'false');
form.append('metadata', '<string>');
form.append('label.0', '{
"fileName": "example-file"
}');
const options = {method: 'POST'};
options.body = form;
fetch('https://api.landing.ai/v1/projects/{project_id}/images', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"id": 123,
"name": "<string>",
"uploadTime": "<string>"
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Image
Upload Image
POST
/
v1
/
projects
/
{project_id}
/
images
Upload Image
curl --request POST \
--url https://api.landing.ai/v1/projects/{project_id}/images \
--header 'Content-Type: multipart/form-data' \
--form file='@example-file' \
--form 'name=<string>' \
--form 'label=<string>' \
--form 'tags=<string>' \
--form nothing_to_label=false \
--form 'metadata=<string>' \
--form label.0='@example-file'import requests
url = "https://api.landing.ai/v1/projects/{project_id}/images"
files = {
"file": ("example-file", open("example-file", "rb")),
"label.0": ("example-file", open("example-file", "rb"))
}
payload = {
"name": "<string>",
"label": "<string>",
"tags": "<string>",
"nothing_to_label": "false",
"metadata": "<string>"
}
response = requests.post(url, data=payload, files=files)
print(response.text)const form = new FormData();
form.append('file', '<string>');
form.append('name', '<string>');
form.append('label', '<string>');
form.append('tags', '<string>');
form.append('nothing_to_label', 'false');
form.append('metadata', '<string>');
form.append('label.0', '{
"fileName": "example-file"
}');
const options = {method: 'POST'};
options.body = form;
fetch('https://api.landing.ai/v1/projects/{project_id}/images', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"id": 123,
"name": "<string>",
"uploadTime": "<string>"
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Headers
Path Parameters
Query Parameters
Body
multipart/form-data
Response
Successful Response
Show child attributes
Show child attributes
⌘I

