Show your own photo
curl --request POST \
--url https://api.solaraai.com/api/v1/projects/{id}/items/{itemId}/own-picture \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"media_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"upload_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://api.solaraai.com/api/v1/projects/{id}/items/{itemId}/own-picture"
payload = {
"media_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"upload_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
media_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
upload_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://api.solaraai.com/api/v1/projects/{id}/items/{itemId}/own-picture', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "<string>",
"src": "<string>",
"type": "image",
"provenance": {
"attempt": 123,
"costUsd": 123,
"route": "<string>",
"clipModel": "<string>",
"credit": {
"provider": "<string>",
"author": "<string>",
"authorUrl": "<string>",
"pageUrl": "<string>"
},
"from": "<string>",
"height": 123,
"judgeReason": "<string>",
"judgeScore": 123,
"key": "<string>",
"kind": "<string>",
"label": "<string>",
"model": "<string>",
"prompt": "<string>",
"query": "<string>",
"seconds": 123,
"tried": [
{
"costUsd": 123,
"durationMs": 123,
"model": "<string>",
"error": "<string>",
"reason": "<string>",
"score": 123
}
],
"width": 123
},
"source": "<string>"
}{
"code": "invalid_credentials",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}Editing
Show your own photo
Solara AI API: Shows a photo already uploaded in a picture block: an image upload’s upload_id, or a footage photo’s media_id. Free: never a counted fill.
Permission: Edit (edit).
POST
/
api
/
v1
/
projects
/
{id}
/
items
/
{itemId}
/
own-picture
Show your own photo
curl --request POST \
--url https://api.solaraai.com/api/v1/projects/{id}/items/{itemId}/own-picture \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"media_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"upload_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://api.solaraai.com/api/v1/projects/{id}/items/{itemId}/own-picture"
payload = {
"media_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"upload_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
media_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
upload_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://api.solaraai.com/api/v1/projects/{id}/items/{itemId}/own-picture', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "<string>",
"src": "<string>",
"type": "image",
"provenance": {
"attempt": 123,
"costUsd": 123,
"route": "<string>",
"clipModel": "<string>",
"credit": {
"provider": "<string>",
"author": "<string>",
"authorUrl": "<string>",
"pageUrl": "<string>"
},
"from": "<string>",
"height": 123,
"judgeReason": "<string>",
"judgeScore": 123,
"key": "<string>",
"kind": "<string>",
"label": "<string>",
"model": "<string>",
"prompt": "<string>",
"query": "<string>",
"seconds": 123,
"tried": [
{
"costUsd": 123,
"durationMs": 123,
"model": "<string>",
"error": "<string>",
"reason": "<string>",
"score": 123
}
],
"width": 123
},
"source": "<string>"
}{
"code": "invalid_credentials",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}Authorizations
Body
application/json
Response
Created