Request a scene
const url = 'https://api.shootika.com/v1/scenes';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"model_id":"example","style":"example","pose":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.shootika.com/v1/scenes \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "model_id": "example", "style": "example", "pose": "example" }'Asks for the scene made of one model, one style and one pose. If your store already has that scene, it is returned with status 200 (and a failed one is requested again). Otherwise a new scene starts being prepared and is returned with status 201 and status: generating. It can take a minute or more. Poll GET /scenes/{scene_id} until the status is ready, then start a shoot with it.
Send an Idempotency-Key to make a retry safe. Only 2xx answers are stored and replayed, for 24 hours. A request still running under the same key answers 409 idempotency_in_progress, and a claim older than 5 minutes is treated as abandoned.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”A unique string you choose, 1 to 255 characters, for this request. Repeating the request with the same key and the same body replays the first answer for 24 hours instead of doing the work again. Only 2xx answers are stored. Using the same key with a different request answers 409 idempotency_conflict.
Request Bodyrequired
Section titled “Request Bodyrequired”object
A model id from GET /models.
A style key from GET /styles.
One of that model’s poses.
Examplegenerated
{ "model_id": "example", "style": "example", "pose": "example"}Responses
Section titled “Responses”Your store already had this scene. It is returned as it is.
object
object
object
The style key from GET /styles. A scene made from one of your own uploaded scenes carries that style’s ref: key, the same value you pass to POST /scenes.
Example
{ "scene": { "status": "ready" }}The scene was requested and is being prepared.
object
object
object
The style key from GET /styles. A scene made from one of your own uploaded scenes carries that style’s ref: key, the same value you pass to POST /scenes.
Example
{ "scene": { "status": "ready" }}bad_request: the request could not be read, for example a multipart body with no boundary.
object
What went wrong. Read code in your software; message is for people.
object
A plain sentence for a person.
Only present for some codes. For validation_error it maps each wrong field to a list of problems. For quota_exceeded and daily_cap_reached it describes the allowance.
object
Example
{ "error": { "code": "api_not_enabled" }}unauthorized: the Authorization header is missing, or the key is not valid or has been revoked.
object
What went wrong. Read code in your software; message is for people.
object
A plain sentence for a person.
Only present for some codes. For validation_error it maps each wrong field to a list of problems. For quota_exceeded and daily_cap_reached it describes the allowance.
object
Example
{ "error": { "code": "api_not_enabled" }}api_not_enabled when the API is not switched on for your store yet, store_uninstalled when the store has uninstalled Shootika, or forbidden when the key is not allowed to do that.
object
What went wrong. Read code in your software; message is for people.
object
A plain sentence for a person.
Only present for some codes. For validation_error it maps each wrong field to a list of problems. For quota_exceeded and daily_cap_reached it describes the allowance.
object
Example
{ "error": { "code": "api_not_enabled" }}not_found: that model does not exist or cannot be used by your store.
object
What went wrong. Read code in your software; message is for people.
object
A plain sentence for a person.
Only present for some codes. For validation_error it maps each wrong field to a list of problems. For quota_exceeded and daily_cap_reached it describes the allowance.
object
Example
{ "error": { "code": "api_not_enabled" }}method_not_allowed: this address does not accept that method. The Allow header lists the ones it does.
object
What went wrong. Read code in your software; message is for people.
object
A plain sentence for a person.
Only present for some codes. For validation_error it maps each wrong field to a list of problems. For quota_exceeded and daily_cap_reached it describes the allowance.
object
Example
{ "error": { "code": "api_not_enabled" }}Headers
Section titled “Headers”idempotency_conflict when the key was used for a different request, or idempotency_in_progress when the same key is still running.
object
What went wrong. Read code in your software; message is for people.
object
A plain sentence for a person.
Only present for some codes. For validation_error it maps each wrong field to a list of problems. For quota_exceeded and daily_cap_reached it describes the allowance.
object
Example
{ "error": { "code": "api_not_enabled" }}validation_error when a field is missing, or when the style or the pose is not one this model can take. The details name the fields.
object
What went wrong. Read code in your software; message is for people.
object
A plain sentence for a person.
Only present for some codes. For validation_error it maps each wrong field to a list of problems. For quota_exceeded and daily_cap_reached it describes the allowance.
object
Example
{ "error": { "code": "api_not_enabled" }}rate_limited: more than 120 requests in a minute with this key. Wait the number of seconds in Retry-After.
object
What went wrong. Read code in your software; message is for people.
object
A plain sentence for a person.
Only present for some codes. For validation_error it maps each wrong field to a list of problems. For quota_exceeded and daily_cap_reached it describes the allowance.
object
Example
{ "error": { "code": "api_not_enabled" }}Headers
Section titled “Headers”internal_error: something went wrong on our side. Try again.
object
What went wrong. Read code in your software; message is for people.
object
A plain sentence for a person.
Only present for some codes. For validation_error it maps each wrong field to a list of problems. For quota_exceeded and daily_cap_reached it describes the allowance.
object
Example
{ "error": { "code": "api_not_enabled" }}service_busy: Shootika is busy right now. Try again in a moment.
object
What went wrong. Read code in your software; message is for people.
object
A plain sentence for a person.
Only present for some codes. For validation_error it maps each wrong field to a list of problems. For quota_exceeded and daily_cap_reached it describes the allowance.
object
Example
{ "error": { "code": "api_not_enabled" }}