{"openapi":"3.1.0","info":{"title":"WriftAI API v1","description":"Easily run and fine-tune machine learning models or deploy your own.","termsOfService":"https://wrift.ai/terms-of-service","contact":{"name":"wriftai","email":"wriftai@sych.io"},"version":"1.0.0"},"servers":[{"url":"api.wrift.ai/v1"}],"paths":{"/predictions":{"post":{"tags":["Predictions"],"summary":"Create a prediction.","description":"Create a prediction for the provided inputs against the specified model. By default this endpoint handles requests asynchronously by creating a prediction and returning the created prediction without waiting for a response from the model. This endpoint can be made to wait for a response by passing a optional Prefer header with the wait time. This endpoint will then wait upto the wait time specified for a response from the model. If it receives one it will return the response otherwise the pending prediction is returned which can be polled for updates using get prediction endpoint. Optionally, pass 'cancel' alongside the wait time to cancel the prediction if it does not complete within the wait time. e.g Prefer: wait=10, cancel. Cancellation is asynchronous and the prediction's status will remain unchanged until cancellation takes effect.","operationId":"create_prediction","security":[{"HTTPBearer":[]}],"parameters":[{"name":"Validate-Input","in":"header","required":false,"schema":{"type":"boolean","description":"Enable early input validation against the model schema to catch invalid inputs before spinning up the hardware, adding slight latency, but avoiding unnecessary execution and cost.","default":false,"title":"Validate-Input"},"description":"Enable early input validation against the model schema to catch invalid inputs before spinning up the hardware, adding slight latency, but avoiding unnecessary execution and cost."},{"name":"Prefer","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Pass a wait time to tell the server how long to wait in seconds for a prediction response. e.g Prefer: wait=10 will wait for upto 10 seconds. Optionally, pass 'cancel' to request cancellation if the wait time is exceeded. e.g Prefer: wait=10, cancel. Cancellation is asynchronous and the prediction's status will remain unchanged until cancellation takes effect. Other preferences passed will be ignored which means Prefer: wait=10 and Prefer: respond-async, wait=10 are equivalent as the respond-async directive is ignored. When used alongside streaming the wait time will refer to the maximum idle time allowed between successive events before the connection is closed.","title":"Prefer"},"description":"Pass a wait time to tell the server how long to wait in seconds for a prediction response. e.g Prefer: wait=10 will wait for upto 10 seconds. Optionally, pass 'cancel' to request cancellation if the wait time is exceeded. e.g Prefer: wait=10, cancel. Cancellation is asynchronous and the prediction's status will remain unchanged until cancellation takes effect. Other preferences passed will be ignored which means Prefer: wait=10 and Prefer: respond-async, wait=10 are equivalent as the respond-async directive is ignored. When used alongside streaming the wait time will refer to the maximum idle time allowed between successive events before the connection is closed."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePredictionRequestBody"}}}},"responses":{"200":{"description":"The model returned a response during the wait time passed in the prefer header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PredictionWithIO"}}}},"202":{"description":"No wait time was passed or the model did not respond within the wait time passed in the prefer header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PredictionWithIO"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Predictions"],"summary":"List predictions","description":"Retrieve a paginated list of all predictions for the authenticated user. The predictions are sorted by creation time, newest to oldest.","operationId":"list_predictions","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The starting point to fetch the next set of items.","title":"Cursor"},"description":"The starting point to fetch the next set of items."},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":5,"description":"The number of results per page.","default":25,"title":"Page Size"},"description":"The number of results per page."},{"name":"statuses","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/TaskStatus"},"maxItems":5},{"type":"null"}],"description":"A list of task statuses to filter results. Matches any of the provided statuses (OR logic).","title":"Statuses"},"description":"A list of task statuses to filter results. Matches any of the provided statuses (OR logic)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_Prediction_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/predictions/{prediction_id}":{"get":{"tags":["Predictions"],"summary":"Get a prediction","description":"Retrieve a prediction by its id.","operationId":"get_prediction","security":[{"HTTPBearer":[]}],"parameters":[{"name":"prediction_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"The ID of the prediction to get.","title":"Prediction Id"},"description":"The ID of the prediction to get."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PredictionWithIO"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/predictions/{prediction_id}/cancel":{"post":{"tags":["Predictions"],"summary":"Cancel a prediction","description":"Cancel a prediction by its id. Only predictions that have not yet terminated can be cancelled. Cancellation is asynchronous and the prediction's status will remain unchanged until cancellation takes effect. Requesting cancellation for a prediction that has already been requested for cancellation is idempotent. Attempting to cancel a terminated prediction will return an error.","operationId":"cancel_prediction","security":[{"HTTPBearer":[]}],"parameters":[{"name":"prediction_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"The ID of the prediction to cancel.","title":"Prediction Id"},"description":"The ID of the prediction to cancel."}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/user":{"get":{"tags":["Authenticated User"],"summary":"Get the authenticated user","description":"Retrieve the authenticated user.","operationId":"get_user","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserWithDetails"}}}}},"security":[{"HTTPBearer":[]}]},"patch":{"tags":["Authenticated User"],"summary":"Update the authenticated user","description":"This endpoint uses PATCH semantics, meaning only the fields provided in the request body will be updated; all other fields remain unchanged.","operationId":"update_user","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserRequestBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserWithDetails"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/user/models":{"get":{"tags":["Authenticated User"],"summary":"List models owned by the authenticated user","description":"Retrieve a paginated list of all models owned by the authenticated user. The models are sorted by creation time, newest to oldest.","operationId":"list_models","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The starting point to fetch the next set of items.","title":"Cursor"},"description":"The starting point to fetch the next set of items."},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":5,"description":"The number of results per page.","default":25,"title":"Page Size"},"description":"The number of results per page."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_ModelWithDetails_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/users/{username}":{"get":{"tags":["Users"],"summary":"Get a user","description":"Retrieve a user by username.","operationId":"get_user_by_username","security":[{"HTTPBearer":[]}],"parameters":[{"name":"username","in":"path","required":true,"schema":{"type":"string","description":"The username of the user to get.","title":"Username"},"description":"The username of the user to get."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserWithDetails"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/users":{"get":{"tags":["Users"],"summary":"List users","description":"Retrieves a paginated list of users. By default the users are returned in the order that they joined WriftAI.","operationId":"list_users","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The starting point to fetch the next set of items.","title":"Cursor"},"description":"The starting point to fetch the next set of items."},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":5,"description":"The number of results per page.","default":25,"title":"Page Size"},"description":"The number of results per page."},{"name":"sort_by","in":"query","required":false,"schema":{"$ref":"#/components/schemas/UsersSortBy","description":"The field by which to sort the results.","default":"created_at"},"description":"The field by which to sort the results."},{"name":"sort_direction","in":"query","required":false,"schema":{"enum":["asc","desc"],"type":"string","description":"The direction in which to sort the results.","default":"asc","title":"Sort Direction"},"description":"The direction in which to sort the results."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_User_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/models":{"post":{"tags":["Models"],"summary":"Create a model","description":"Create a new model.","operationId":"create_model","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateModelRequestBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelDetailsComplete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Models"],"summary":"List public models","description":"Retrieve a paginated list of public models. By default, the models are returned in the order that they were created. When sorting by prediction count, only models that have at least one prediction will be returned.","operationId":"list_public_models","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The starting point to fetch the next set of items.","title":"Cursor"},"description":"The starting point to fetch the next set of items."},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":5,"description":"The number of results per page.","default":25,"title":"Page Size"},"description":"The number of results per page."},{"name":"sort_by","in":"query","required":false,"schema":{"$ref":"#/components/schemas/ModelsSortBy","description":"The field by which to sort the results.","default":"created_at"},"description":"The field by which to sort the results."},{"name":"sort_direction","in":"query","required":false,"schema":{"enum":["asc","desc"],"type":"string","description":"The direction in which to sort the results.","default":"asc","title":"Sort Direction"},"description":"The direction in which to sort the results."},{"name":"category_slugs","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"},"maxItems":20},{"type":"null"}],"description":"A list of category slugs to filter results. Matches any of the provided slugs (OR logic).","title":"Category Slugs"},"description":"A list of category slugs to filter results. Matches any of the provided slugs (OR logic)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_ModelWithDetails_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/models/{model_owner}/{model_name}":{"get":{"tags":["Models"],"summary":"Get a model","description":"Retrieve a model using the specified owner and name. You must be authenticated with the necessary permissions to fetch a private model.","operationId":"get_model","security":[{"HTTPBearer":[]}],"parameters":[{"name":"model_owner","in":"path","required":true,"schema":{"type":"string","description":"The username of the user that owns the model.","title":"Model Owner"},"description":"The username of the user that owns the model."},{"name":"model_name","in":"path","required":true,"schema":{"type":"string","description":"The name of the model.","title":"Model Name"},"description":"The name of the model."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelDetailsComplete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Models"],"summary":"Update a model","description":"This endpoint uses PATCH semantics, meaning only the fields provided in the request body will be updated; all other fields remain unchanged.","operationId":"update_model","security":[{"HTTPBearer":[]}],"parameters":[{"name":"model_owner","in":"path","required":true,"schema":{"type":"string","description":"The username of the user that owns the model.","title":"Model Owner"},"description":"The username of the user that owns the model."},{"name":"model_name","in":"path","required":true,"schema":{"type":"string","description":"The name of the model.","title":"Model Name"},"description":"The name of the model."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateModelRequestBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelDetailsComplete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Models"],"summary":"Delete a model","description":"Delete a model by its name.","operationId":"delete_model","security":[{"HTTPBearer":[]}],"parameters":[{"name":"model_owner","in":"path","required":true,"schema":{"type":"string","description":"The username of the user that owns the model.","title":"Model Owner"},"description":"The username of the user that owns the model."},{"name":"model_name","in":"path","required":true,"schema":{"type":"string","description":"The name of the model.","title":"Model Name"},"description":"The name of the model."}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/models/{model_owner}":{"get":{"tags":["Models"],"summary":"List models for a user.","description":"Retrieve a list of public models owned by the specified user. By default, the models are returned in the order that they were created. When sorting by prediction count, only models that have at least one prediction will be returned.","operationId":"list_users_public_models","security":[{"HTTPBearer":[]}],"parameters":[{"name":"model_owner","in":"path","required":true,"schema":{"type":"string","description":"The username of the model's owner.","title":"Model Owner"},"description":"The username of the model's owner."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The starting point to fetch the next set of items.","title":"Cursor"},"description":"The starting point to fetch the next set of items."},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":5,"description":"The number of results per page.","default":25,"title":"Page Size"},"description":"The number of results per page."},{"name":"sort_by","in":"query","required":false,"schema":{"$ref":"#/components/schemas/ModelsSortBy","description":"The field by which to sort the results.","default":"created_at"},"description":"The field by which to sort the results."},{"name":"sort_direction","in":"query","required":false,"schema":{"enum":["asc","desc"],"type":"string","description":"The direction in which to sort the results.","default":"asc","title":"Sort Direction"},"description":"The direction in which to sort the results."},{"name":"category_slugs","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"},"maxItems":20},{"type":"null"}],"description":"A list of category slugs to filter results. Matches any of the provided slugs (OR logic).","title":"Category Slugs"},"description":"A list of category slugs to filter results. Matches any of the provided slugs (OR logic)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_ModelWithDetails_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/models/{model_owner}/{model_name}/versions":{"get":{"tags":["Model Versions"],"summary":"List model versions","description":"Retrieve a paginated list of a model's versions. The versions are sorted by creation time, newest to oldest.","operationId":"list_model_versions","security":[{"HTTPBearer":[]}],"parameters":[{"name":"model_owner","in":"path","required":true,"schema":{"type":"string","description":"The username of the user that owns the model.","title":"Model Owner"},"description":"The username of the user that owns the model."},{"name":"model_name","in":"path","required":true,"schema":{"type":"string","description":"The name of the model.","title":"Model Name"},"description":"The name of the model."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The starting point to fetch the next set of items.","title":"Cursor"},"description":"The starting point to fetch the next set of items."},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":5,"description":"The number of results per page.","default":25,"title":"Page Size"},"description":"The number of results per page."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_ModelVersion_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Model Versions"],"summary":"Create a model version","description":"Create a version of a model.","operationId":"create_model_version","security":[{"HTTPBearer":[]}],"parameters":[{"name":"model_owner","in":"path","required":true,"schema":{"type":"string","description":"The username of the user that owns the model.","title":"Model Owner"},"description":"The username of the user that owns the model."},{"name":"model_name","in":"path","required":true,"schema":{"type":"string","description":"The name of the model.","title":"Model Name"},"description":"The name of the model."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateModelVersionRequestBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelVersionWithDetails"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/models/{model_owner}/{model_name}/versions/{version_number}":{"get":{"tags":["Model Versions"],"summary":"Get a model version","description":"Retrieve a model's version by its number.","operationId":"get_model_version","security":[{"HTTPBearer":[]}],"parameters":[{"name":"model_owner","in":"path","required":true,"schema":{"type":"string","description":"The username of the user that owns the model.","title":"Model Owner"},"description":"The username of the user that owns the model."},{"name":"model_name","in":"path","required":true,"schema":{"type":"string","description":"The name of the model.","title":"Model Name"},"description":"The name of the model."},{"name":"version_number","in":"path","required":true,"schema":{"type":"integer","description":"The number of the version.","title":"Version Number"},"description":"The number of the version."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelVersionWithDetails"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Model Versions"],"summary":"Delete a model version","description":"Delete a model's version by its number.","operationId":"delete_model_version","security":[{"HTTPBearer":[]}],"parameters":[{"name":"model_owner","in":"path","required":true,"schema":{"type":"string","description":"The username of the user that owns the model.","title":"Model Owner"},"description":"The username of the user that owns the model."},{"name":"model_name","in":"path","required":true,"schema":{"type":"string","description":"The name of the model.","title":"Model Name"},"description":"The name of the model."},{"name":"version_number","in":"path","required":true,"schema":{"type":"integer","description":"The number of the version to delete.","title":"Version Number"},"description":"The number of the version to delete."}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/hardware":{"get":{"tags":["Hardware"],"summary":"List hardware","description":"Retrieve a paginated list of available hardware for models.","operationId":"list_hardware","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The starting point to fetch the next set of items.","title":"Cursor"},"description":"The starting point to fetch the next set of items."},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":5,"description":"The number of results per page.","default":25,"title":"Page Size"},"description":"The number of results per page."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_HardwareWithDetails_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/search/models":{"get":{"tags":["Search"],"summary":"Search models","description":"Retrieve a list of public models that match the search query.","operationId":"search_models","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The starting point to fetch the next set of items.","title":"Cursor"},"description":"The starting point to fetch the next set of items."},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":5,"description":"The number of results per page.","default":25,"title":"Page Size"},"description":"The number of results per page."},{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":50,"description":"The search query.","title":"Q"},"description":"The search query."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_ModelWithDetails_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/search/users":{"get":{"tags":["Search"],"summary":"Search users","description":"Retrieves a list of user's that match the search query.","operationId":"search_users","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The starting point to fetch the next set of items.","title":"Cursor"},"description":"The starting point to fetch the next set of items."},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":5,"description":"The number of results per page.","default":25,"title":"Page Size"},"description":"The number of results per page."},{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":50,"description":"The search query.","title":"Q"},"description":"The search query."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_User_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/model_categories":{"get":{"tags":["Model Categories"],"summary":"List model categories","description":"Retrieve a paginated list of model categories.","operationId":"list_categories","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The starting point to fetch the next set of items.","title":"Cursor"},"description":"The starting point to fetch the next set of items."},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":5,"description":"The number of results per page.","default":25,"title":"Page Size"},"description":"The number of results per page."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_ModelCategoryWithDetails_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/files/urls":{"post":{"tags":["Files"],"summary":"Generate upload and download urls","description":"Generate urls to upload and download a file for a resource.","operationId":"generate_file_upload_download_urls","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetFileURLsRequestBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileUrls"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/openai/chat/completions":{"post":{"tags":["OpenAI"],"summary":"Create a chat completion","description":"OpenAI compatible chat completions endpoint. Note: the auto-generated documentation only displays fields processed by our API. For the complete request and response schema, refer to the official OpenAI Chat Completions API specification. This endpoint also supports additional custom request and response fields beyond the OpenAI spec. Requests that get timed out will be cancelled automatically. This endpoint is experimental and subject to change or removal.","operationId":"openai_create_chat_completion","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompatibilityRequestWithStreaming"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/openai/images/generations":{"post":{"tags":["OpenAI"],"summary":"Generate an image","description":"OpenAI compatible image generation endpoint. Note: the auto-generated documentation only displays fields processed by our API. For the complete request and response schema, refer to the official OpenAI Image Generations API specification. This endpoint also supports additional custom request and response fields beyond the OpenAI spec. Requests that get timed out will be cancelled automatically. This endpoint is experimental and subject to change or removal.","operationId":"openai_generate_image","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompatibilityRequestWithStreaming"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/openai/embeddings":{"post":{"tags":["OpenAI"],"summary":"Create an embedding","description":"OpenAI compatible embeddings endpoint. Note: the auto-generated documentation only displays fields processed by our API. For the complete request and response schema, refer to the official OpenAI Embeddings API specification. This endpoint also supports additional custom request and response fields beyond the OpenAI spec. Requests that get timed out will be cancelled automatically. This endpoint is experimental and subject to change or removal.","operationId":"openai_create_embeddings","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompatibilityRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/openai/responses":{"post":{"tags":["OpenAI"],"summary":"Create a model response","description":"OpenAI compatible responses endpoint. Note: the auto-generated documentation only displays fields processed by our API. For the complete request and response schema, refer to the official OpenAI Responses API specification. This endpoint also supports additional custom request and response fields beyond the OpenAI spec. Requests that get timed out will be cancelled automatically. This endpoint is experimental and subject to change or removal.","operationId":"openai_create_response","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompatibilityRequestWithStreaming"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/anthropic/v1/messages":{"post":{"tags":["Anthropic"],"summary":"Create a message","description":"Anthropic compatible messages endpoint. Note: the auto-generated documentation only displays fields processed by our API. For the complete request and response schema, refer to the official Anthropic Messages API specification. This endpoint also supports additional custom request and response fields beyond the Anthropic spec. Requests that get timed out will be cancelled automatically. This endpoint is experimental and subject to change or removal.","operationId":"anthropic_create_message","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompatibilityRequestWithStreaming"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}}},"components":{"schemas":{"BaseUser":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"The unique identifier of the user."},"username":{"type":"string","title":"Username","description":"The username of the user."},"avatar_url":{"type":"string","title":"Avatar Url","description":"The url of the user's avatar."}},"type":"object","required":["id","username","avatar_url"],"title":"BaseUser"},"Compatibilities":{"properties":{"openai_chat_completions":{"type":"boolean","title":"Openai Chat Completions","description":"Represents whether this version supports the OpenAI compatible chat completions endpoint.","default":false},"openai_images_generations":{"type":"boolean","title":"Openai Images Generations","description":"Represents whether this version supports the OpenAI compatible image generation endpoint.","default":false},"openai_embeddings":{"type":"boolean","title":"Openai Embeddings","description":"Represents whether this version supports the OpenAI compatible embeddings endpoint.","default":false},"openai_responses":{"type":"boolean","title":"Openai Responses","description":"Represents whether this version supports the OpenAI compatible responses endpoint.","default":false},"anthropic_messages":{"type":"boolean","title":"Anthropic Messages","description":"Represents whether this version supports the Anthropic compatible messages endpoint.","default":false}},"type":"object","title":"Compatibilities"},"CompatibilityRequest":{"properties":{"model":{"type":"string","title":"Model","description":"The model to use. Models must be in the following format: model_owner/model_name or model_owner/model_name:version_number. If no version is specified, the prediction runs with the model's latest version otherwise it runs with the specified version."}},"additionalProperties":true,"type":"object","required":["model"],"title":"CompatibilityRequest"},"CompatibilityRequestWithStreaming":{"properties":{"model":{"type":"string","title":"Model","description":"The model to use. Models must be in the following format: model_owner/model_name or model_owner/model_name:version_number. If no version is specified, the prediction runs with the model's latest version otherwise it runs with the specified version."},"stream":{"type":"boolean","title":"Stream","description":"If true, the model response is streamed as server-sent events.","default":false}},"additionalProperties":true,"type":"object","required":["model"],"title":"CompatibilityRequestWithStreaming"},"CreateModelRequestBody":{"properties":{"name":{"type":"string","title":"Name","description":"The name of the model."},"visibility":{"$ref":"#/components/schemas/ModelVisibility","description":"The visibility of the model.","default":"private"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"The description of the model."},"overview":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Overview","description":"The overview of the model."},"hardware_identifier":{"type":"string","title":"Hardware Identifier","description":"The identifier of the hardware used by the model."},"source_url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Source Url","description":"Source url from where the model's code can be referenced."},"license_url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"License Url","description":"License url where the model's usage is specified."},"paper_url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Paper Url","description":"Paper url from where research info on the model can be found."},"category_slugs":{"items":{"type":"string"},"type":"array","maxItems":3,"title":"Category Slugs","description":"A list of model category slugs.","default":[]}},"type":"object","required":["name","hardware_identifier"],"title":"CreateModelRequestBody"},"CreateModelVersionRequestBody":{"properties":{"release_notes":{"type":"string","maxLength":255,"title":"Release Notes","description":"Information about changes such as new features, bug fixes, or optimizations in this version."},"schemas":{"$ref":"#/components/schemas/Schemas","description":"The schemas of the model version."},"container_image_digest":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$","title":"Container Image Digest","description":"A sha256 hash digest of the version's container image."},"compatibilities":{"$ref":"#/components/schemas/Compatibilities","description":"Compatibility flags for different API endpoints supported by this version.","default":{"openai_chat_completions":false,"openai_images_generations":false,"openai_embeddings":false,"openai_responses":false,"anthropic_messages":false}}},"additionalProperties":false,"type":"object","required":["release_notes","schemas","container_image_digest"],"title":"CreateModelVersionRequestBody"},"CreatePredictionRequestBody":{"properties":{"model":{"type":"string","title":"Model","description":"The model to use. Models must be in the following format: model_owner/model_name or model_owner/model_name:version_number. If no version is specified, the prediction runs with the model's latest version otherwise it runs with the specified version."},"stream":{"type":"boolean","title":"Stream","description":"If true, the model response is streamed as server-sent events.","default":false},"input":{"additionalProperties":{"$ref":"#/components/schemas/JsonValue"},"type":"object","title":"Input","description":"The input to pass to the model during prediction."},"webhook":{"anyOf":[{"$ref":"#/components/schemas/Webhook"},{"type":"null"}],"description":"Details about the webhook to post prediction updates to."}},"type":"object","required":["model","input"],"title":"CreatePredictionRequestBody"},"ErrorSource":{"type":"string","enum":["internal","model"],"title":"ErrorSource"},"FileUrls":{"properties":{"upload_url":{"type":"string","title":"Upload Url","description":"The url to use to upload the file. The file should be uploaded using a PUT request to this URL. The Content-Length and Content-type headers are required and should match the size and MIME type of the file being uploaded."},"download_url":{"type":"string","title":"Download Url","description":" The url to download the file."}},"type":"object","required":["upload_url","download_url"],"title":"FileUrls"},"GetFileURLsRequestBody":{"properties":{"name":{"type":"string","title":"Name","description":"The name of the file to upload"},"size":{"type":"integer","exclusiveMinimum":0.0,"title":"Size","description":"The size of the file to upload in bytes. This should be the exact size of the file. Any mismatch will result in the url being invalid or a corrupt file being uploaded."},"resource":{"type":"string","const":"prediction","title":"Resource","description":"The resource the object will be related to."},"mime_type":{"type":"string","title":"Mime Type","description":"The MIME type of the file."}},"type":"object","required":["name","size","resource","mime_type"],"title":"GetFileURLsRequestBody"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"Hardware":{"properties":{"identifier":{"type":"string","title":"Identifier","description":"The identifier of the hardware"},"name":{"type":"string","title":"Name","description":"The name of the hardware."}},"type":"object","required":["identifier","name"],"title":"Hardware"},"HardwareWithDetails":{"properties":{"identifier":{"type":"string","title":"Identifier","description":"The identifier of the hardware"},"name":{"type":"string","title":"Name","description":"The name of the hardware."},"gpus":{"type":"integer","title":"Gpus","description":"The number of GPUs in the hardware."},"cpus":{"type":"integer","title":"Cpus","description":"The number of CPUs in the hardware."},"vram_gb":{"type":"integer","title":"Vram Gb","description":"The VRAM in GB for the hardware."},"ram_gib":{"type":"integer","title":"Ram Gib","description":"The ram for the hardware instance in GiB."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"The date and time when the hardware was created."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"The description of the hardware."}},"type":"object","required":["identifier","name","gpus","cpus","vram_gb","ram_gib","created_at","description"],"title":"HardwareWithDetails"},"JsonValue":{},"ModelCategory":{"properties":{"name":{"type":"string","title":"Name","description":"The name of the model category."},"slug":{"type":"string","title":"Slug","description":"The unique model category slug."}},"type":"object","required":["name","slug"],"title":"ModelCategory"},"ModelCategoryWithDetails":{"properties":{"name":{"type":"string","title":"Name","description":"The name of the model category."},"slug":{"type":"string","title":"Slug","description":"The unique model category slug."},"description":{"type":"string","title":"Description","description":"The description of the model category."}},"type":"object","required":["name","slug","description"],"title":"ModelCategoryWithDetails"},"ModelDetailsComplete":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"The unique identifier of the model."},"name":{"type":"string","title":"Name","description":"The name of the model."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"The time when the model was created."},"visibility":{"$ref":"#/components/schemas/ModelVisibility","description":"The visibility of the model."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"The description of the model."},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At","description":"The time when the model was updated."},"owner":{"$ref":"#/components/schemas/BaseUser","description":"The details of the owner of the model."},"predictions_count":{"type":"integer","title":"Predictions Count","description":"The total number of predictions created across all versions of the model."},"categories":{"items":{"$ref":"#/components/schemas/ModelCategory"},"type":"array","title":"Categories","description":"The categories associated with the model."},"overview":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Overview","description":"The overview of the model."},"latest_version":{"anyOf":[{"$ref":"#/components/schemas/ModelVersionWithDetails"},{"type":"null"}],"description":"The details of the latest deployed version of the model."},"hardware":{"$ref":"#/components/schemas/Hardware","description":"The hardware used by the model"},"source_url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Source Url","description":"Source url from where the model's code can be referenced."},"license_url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"License Url","description":"License url where the model's usage is specified."},"paper_url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Paper Url","description":"Paper url from where research info on the model can be found."}},"type":"object","required":["id","name","created_at","visibility","description","updated_at","owner","predictions_count","categories","overview","latest_version","hardware","source_url","license_url","paper_url"],"title":"ModelDetailsComplete"},"ModelVersion":{"properties":{"number":{"type":"integer","title":"Number","description":"Number of the model version."},"release_notes":{"type":"string","title":"Release Notes","description":"Information about changes such as new features, bug fixes, or optimizations in this version."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"The time when the version was created."},"container_image_digest":{"type":"string","title":"Container Image Digest","description":"A sha256 hash digest of the version's container image."}},"type":"object","required":["number","release_notes","created_at","container_image_digest"],"title":"ModelVersion"},"ModelVersionWithDetails":{"properties":{"number":{"type":"integer","title":"Number","description":"Number of the model version."},"release_notes":{"type":"string","title":"Release Notes","description":"Information about changes such as new features, bug fixes, or optimizations in this version."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"The time when the version was created."},"container_image_digest":{"type":"string","title":"Container Image Digest","description":"A sha256 hash digest of the version's container image."},"schemas":{"$ref":"#/components/schemas/Schemas","description":"The schemas of the model version."},"compatibilities":{"$ref":"#/components/schemas/Compatibilities","description":"Compatibility flags for different API endpoints supported by this version."}},"type":"object","required":["number","release_notes","created_at","container_image_digest","schemas","compatibilities"],"title":"ModelVersionWithDetails"},"ModelVisibility":{"type":"string","enum":["private","public"],"title":"ModelVisibility"},"ModelWithDetails":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"The unique identifier of the model."},"name":{"type":"string","title":"Name","description":"The name of the model."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"The time when the model was created."},"visibility":{"$ref":"#/components/schemas/ModelVisibility","description":"The visibility of the model."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"The description of the model."},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At","description":"The time when the model was updated."},"owner":{"$ref":"#/components/schemas/BaseUser","description":"The details of the owner of the model."},"predictions_count":{"type":"integer","title":"Predictions Count","description":"The total number of predictions created across all versions of the model."},"categories":{"items":{"$ref":"#/components/schemas/ModelCategory"},"type":"array","title":"Categories","description":"The categories associated with the model."}},"type":"object","required":["id","name","created_at","visibility","description","updated_at","owner","predictions_count","categories"],"title":"ModelWithDetails"},"ModelsSortBy":{"type":"string","enum":["created_at","predictions_count"],"title":"ModelsSortBy"},"PaginatedResponse_HardwareWithDetails_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/HardwareWithDetails"},"type":"array","title":"Items","description":"A list of items in the current page."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"A cursor pointing to the next page of items."},"previous_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Previous Cursor","description":"A cursor pointing to the previous page of items."},"next_url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Next Url","description":"A url to fetch items from the next page.","readOnly":true},"previous_url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Previous Url","description":"A url to fetch items from the previous page.","readOnly":true}},"type":"object","required":["items","next_url","previous_url"],"title":"PaginatedResponse[HardwareWithDetails]"},"PaginatedResponse_ModelCategoryWithDetails_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ModelCategoryWithDetails"},"type":"array","title":"Items","description":"A list of items in the current page."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"A cursor pointing to the next page of items."},"previous_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Previous Cursor","description":"A cursor pointing to the previous page of items."},"next_url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Next Url","description":"A url to fetch items from the next page.","readOnly":true},"previous_url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Previous Url","description":"A url to fetch items from the previous page.","readOnly":true}},"type":"object","required":["items","next_url","previous_url"],"title":"PaginatedResponse[ModelCategoryWithDetails]"},"PaginatedResponse_ModelVersion_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ModelVersion"},"type":"array","title":"Items","description":"A list of items in the current page."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"A cursor pointing to the next page of items."},"previous_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Previous Cursor","description":"A cursor pointing to the previous page of items."},"next_url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Next Url","description":"A url to fetch items from the next page.","readOnly":true},"previous_url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Previous Url","description":"A url to fetch items from the previous page.","readOnly":true}},"type":"object","required":["items","next_url","previous_url"],"title":"PaginatedResponse[ModelVersion]"},"PaginatedResponse_ModelWithDetails_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ModelWithDetails"},"type":"array","title":"Items","description":"A list of items in the current page."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"A cursor pointing to the next page of items."},"previous_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Previous Cursor","description":"A cursor pointing to the previous page of items."},"next_url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Next Url","description":"A url to fetch items from the next page.","readOnly":true},"previous_url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Previous Url","description":"A url to fetch items from the previous page.","readOnly":true}},"type":"object","required":["items","next_url","previous_url"],"title":"PaginatedResponse[ModelWithDetails]"},"PaginatedResponse_Prediction_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Prediction"},"type":"array","title":"Items","description":"A list of items in the current page."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"A cursor pointing to the next page of items."},"previous_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Previous Cursor","description":"A cursor pointing to the previous page of items."},"next_url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Next Url","description":"A url to fetch items from the next page.","readOnly":true},"previous_url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Previous Url","description":"A url to fetch items from the previous page.","readOnly":true}},"type":"object","required":["items","next_url","previous_url"],"title":"PaginatedResponse[Prediction]"},"PaginatedResponse_User_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/User"},"type":"array","title":"Items","description":"A list of items in the current page."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"A cursor pointing to the next page of items."},"previous_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Previous Cursor","description":"A cursor pointing to the previous page of items."},"next_url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Next Url","description":"A url to fetch items from the next page.","readOnly":true},"previous_url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Previous Url","description":"A url to fetch items from the previous page.","readOnly":true}},"type":"object","required":["items","next_url","previous_url"],"title":"PaginatedResponse[User]"},"PaginationQueryParams":{"properties":{"cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor","description":"The starting point to fetch the next set of items."},"page_size":{"type":"integer","maximum":50.0,"minimum":5.0,"title":"Page Size","description":"The number of results per page.","default":25}},"type":"object","title":"PaginationQueryParams"},"Prediction":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"The unique identifier of the prediction."},"model":{"$ref":"#/components/schemas/PredictionModel","description":"Details about the model for the prediction."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"The time when the prediction was created."},"status":{"$ref":"#/components/schemas/TaskStatus","description":"The status of the prediction."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"The time when the prediction was last updated."},"setup_time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Setup Time","description":"Time in seconds taken to set up the model after the task was pulled from the queue (i.e., cold-start time)."},"execution_time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Execution Time","description":"Time in seconds the model took to run the task."}},"type":"object","required":["id","model","created_at","status","updated_at","setup_time","execution_time"],"title":"Prediction"},"PredictionModel":{"properties":{"owner":{"type":"string","title":"Owner"},"name":{"type":"string","title":"Name"},"version_number":{"type":"integer","title":"Version Number"}},"type":"object","required":["owner","name","version_number"],"title":"PredictionModel"},"PredictionWithIO":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"The unique identifier of the prediction."},"model":{"$ref":"#/components/schemas/PredictionModel","description":"Details about the model for the prediction."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"The time when the prediction was created."},"status":{"$ref":"#/components/schemas/TaskStatus","description":"The status of the prediction."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"The time when the prediction was last updated."},"setup_time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Setup Time","description":"Time in seconds taken to set up the model after the task was pulled from the queue (i.e., cold-start time)."},"execution_time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Execution Time","description":"Time in seconds the model took to run the task."},"error":{"anyOf":[{"$ref":"#/components/schemas/TaskError"},{"type":"null"}],"description":"Error output of the prediction if the prediction failed."},"input":{"$ref":"#/components/schemas/JsonValue","description":"The input used for the prediction."},"output":{"$ref":"#/components/schemas/JsonValue","description":"The success output of the prediction."},"stream":{"type":"boolean","title":"Stream","description":"Whether the prediction supports streaming. This value may change to false if streaming is no longer available for the prediction, such as after it has expired."}},"type":"object","required":["id","model","created_at","status","updated_at","setup_time","execution_time","error","input","output","stream"],"title":"PredictionWithIO"},"SchemaIO":{"properties":{"input":{"additionalProperties":true,"type":"object","title":"Input","description":"Schema for input, following JSON Schema Draft 2020-12 standards."},"output":{"additionalProperties":true,"type":"object","title":"Output","description":"Schema for output, following JSON Schema Draft 2020-12 standards."}},"additionalProperties":false,"type":"object","required":["input","output"],"title":"SchemaIO"},"Schemas":{"properties":{"prediction":{"$ref":"#/components/schemas/SchemaIO","description":"The input and output schemas for a prediction."}},"type":"object","required":["prediction"],"title":"Schemas"},"TaskError":{"properties":{"source":{"$ref":"#/components/schemas/ErrorSource"},"message":{"type":"string","title":"Message"},"detail":{"$ref":"#/components/schemas/JsonValue"}},"type":"object","required":["source","message","detail"],"title":"TaskError"},"TaskStatus":{"type":"string","enum":["pending","started","failed","succeeded","cancelled","abandoned"],"title":"TaskStatus"},"UpdateModelRequestBody":{"properties":{"name":{"type":"string","title":"Name","description":"The name of the model."},"visibility":{"$ref":"#/components/schemas/ModelVisibility","description":"The visibility of the model."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"The description of the model."},"overview":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Overview","description":"The overview of the model."},"hardware_identifier":{"type":"string","title":"Hardware Identifier","description":"The identifier of the hardware used by the model."},"source_url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Source Url","description":"Source url from where the model's code can be referenced."},"license_url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"License Url","description":"License url where the model's usage is specified."},"paper_url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Paper Url","description":"Paper url from where research info on the model can be found."},"category_slugs":{"items":{"type":"string"},"type":"array","maxItems":3,"title":"Category Slugs","description":"A list of model category slugs."}},"type":"object","title":"UpdateModelRequestBody"},"UpdateUserRequestBody":{"properties":{"username":{"type":"string","title":"Username","description":"The username of the user."},"name":{"anyOf":[{"type":"string","maxLength":70,"minLength":1},{"type":"null"}],"title":"Name","description":"The name of the user."},"bio":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Bio","description":"The biography of the user."},"urls":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":4,"minItems":1},{"type":"null"}],"title":"Urls","description":"The user's personal and professional website URLs."},"location":{"anyOf":[{"type":"string","maxLength":70,"minLength":1},{"type":"null"}],"title":"Location","description":"The location of the user."},"company":{"anyOf":[{"type":"string","maxLength":70,"minLength":1},{"type":"null"}],"title":"Company","description":"The name of the company the user is associated with."}},"type":"object","title":"UpdateUserRequestBody"},"User":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"The unique identifier of the user."},"username":{"type":"string","title":"Username","description":"The username of the user."},"avatar_url":{"type":"string","title":"Avatar Url","description":"The url of the user's avatar."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"The name of the user."},"bio":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bio","description":"The biography of the user."},"location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location","description":"The location of the user."},"company":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company","description":"The name of the company the user is associated with."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"The time when the user joined WriftAI."},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At","description":"The time when the user was updated."}},"type":"object","required":["id","username","avatar_url","name","bio","location","company","created_at","updated_at"],"title":"User"},"UserWithDetails":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"The unique identifier of the user."},"username":{"type":"string","title":"Username","description":"The username of the user."},"avatar_url":{"type":"string","title":"Avatar Url","description":"The url of the user's avatar."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"The name of the user."},"bio":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bio","description":"The biography of the user."},"location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location","description":"The location of the user."},"company":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company","description":"The name of the company the user is associated with."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"The time when the user joined WriftAI."},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At","description":"The time when the user was updated."},"urls":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Urls","description":"The user's personal and professional website URLs."}},"type":"object","required":["id","username","avatar_url","name","bio","location","company","created_at","updated_at","urls"],"title":"UserWithDetails"},"UsersSortBy":{"type":"string","enum":["created_at"],"title":"UsersSortBy"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"Webhook":{"properties":{"url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Url","description":"The HTTP url to POST updates to."},"secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secret","description":"Secret to generate the signature for the webhook request."}},"type":"object","required":["url"],"title":"Webhook"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"},"APIKeyHeader":{"type":"apiKey","in":"header","name":"X-Api-Key"}}}}