HTTP API
Last updated
Last updated
All API requests require a valid API token in the Authorization
header. The token should be prefixed with "Bearer"
, followed by a space and the token itself. Example:
You can find your API tokens at .
Endpoint:
GET https://api.vaikerai.com/v1/account
Description: This endpoint returns details about the user or organization associated with the provided API token.
Example cURL Request:
Response Example:
Endpoint:
GET https://api.vaikerai.com/v1/collections
Description: This endpoint returns a paginated list of model collections.
Example cURL Request:
Response Example:
Endpoint:
GET https://api.vaikerai.com/v1/collections/{collection_slug}
Description: Fetches details of a specific model collection, including the models within it.
Example cURL Request:
Response Example:
Parameters:
collection_slug
(string, required): The slug identifier for the collection (e.g., super-resolution
, image-restoration
).
Endpoint:
GET https://api.vaikerai.com/v1/deployments
Description: Retrieves a list of deployments associated with the current account, including their latest release configurations.
Example cURL Request:
Response Example:
Endpoint:
POST https://api.vaikerai.com/v1/deployments
Description: Creates a new deployment.
Example cURL Request:
Response Example:
Request Body Parameters:
hardware
(string, required): SKU for the hardware used to run the model. Retrieve options from the hardware.list
endpoint.
max_instances
(integer, required): Maximum number of instances for scaling.
min_instances
(integer, required): Minimum number of instances for scaling.
model
(string, required): Full name of the model to deploy (e.g., stability-ai/sdxl
).
name
(string, required): Name of the deployment.
version
(string, required): 64-character ID of the model version to deploy.
Endpoint:
DELETE https://api.vaikerai.com/v1/deployments/{deployment_owner}/{deployment_name}
Description: Deletes a specified deployment. Note that deployments can only be deleted if they have been offline and unused for at least 15 minutes.
Example cURL Request:
Response:
An empty response with HTTP status 204
indicates successful deletion.
Parameters:
deployment_owner
(string, required): The name of the user or organization that owns the deployment.
deployment_name
(string, required): The name of the deployment.
Endpoint:
GET https://api.vaikerai.com/v1/deployments/{deployment_owner}/{deployment_name}
Description: Fetches details about a specific deployment, including its current release.
Example cURL Request:
Response Example:
Parameters:
deployment_owner
(string, required): The name of the user or organization that owns the deployment.
deployment_name
(string, required): The name of the deployment.
PATCH https://api.vaikerai.com/v1/deployments/{deployment_owner}/{deployment_name}
This endpoint allows you to update the properties of an existing deployment. You can modify hardware settings, adjust the minimum and maximum instances, and change the deployment's underlying model version.
Updating any deployment property will increment the number
field of the current_release
.
deployment_owner (string, required): The username or organization name that owns the deployment.
deployment_name (string, required): The name of the deployment to be updated.
hardware (string, optional):
The SKU of the hardware used to run the model. Possible values can be retrieved from the hardware.list
endpoint.
max_instances (integer, optional): The maximum number of instances for scaling.
min_instances (integer, optional): The minimum number of instances for scaling.
version (string, optional): The ID of the model version to deploy.
POST https://api.vaikerai.com/v1/deployments/{deployment_owner}/{deployment_name}/predictions
This endpoint starts a new prediction using the specified deployment. Provide the required input to initiate the prediction process.
Note: Predictions may take several seconds or more to process. To obtain the final result, either provide a webhook URL for notifications or poll the "Get a Prediction" endpoint until the process completes.
Input and output data, including any files, are automatically deleted after one hour. Ensure you save any output files if you intend to use them later.
Output files are served by files.vaikerai.com
and its subdomains. If you use an allowlist of external domains, make sure to add files.vaikerai.com
to it.
deployment_owner (string, required): The username or organization name that owns the deployment.
deployment_name (string, required): The name of the deployment to use for the prediction.
input (object, required):
The input for the model as a JSON object. The input schema depends on the model being used. To see available inputs, refer to the "API" tab on the model’s page or retrieve the model version and check the openapi_schema
property.
Use an HTTP URL for files larger than 256 KB, files you plan to reuse, or to associate metadata with your input files.
Use a Data URL for files smaller than 256 KB, files that don't need to be hosted, or files you don't need to reuse (VaikerAI will not store them).
stream (boolean, deprecated):
This field is no longer required. The returned prediction will automatically include a stream
entry in its url
property if streaming is supported by the model.
webhook (string, optional): An HTTPS URL to receive a POST request when the prediction generates new output. The request body mirrors the response body of the "Get a Prediction" operation. If network issues occur, the webhook will retry a few times, so it must handle multiple calls without issues. VaikerAI does not follow redirects, so provide a URL that resolves directly.
webhook_events_filter (array, optional): Customize which events trigger webhook notifications. Available options:
start
: Triggered when the prediction starts.
output
: Triggered whenever new output is generated (multiple outputs possible).
logs
: Triggered when logs are generated.
completed
: Triggered when the prediction finishes (succeeded/canceled/failed).
Example: To receive notifications only at the start and end of the prediction:
Note: output
and logs
events are sent at most once every 500ms. start
and completed
events will always be sent, regardless of throttling.
GET https://api.vaikerai.com/v1/hardware
Retrieve a list of available hardware configurations that can be used for running models.
GET https://api.vaikerai.com/v1/models
Retrieve a paginated list of publicly available models.
Note: The cover_image_url
is an HTTPS URL pointing to an image file. This can be:
An image uploaded by the model author.
The output file of the example prediction (if the author hasn’t set a cover image).
The input file of the example prediction (if neither the author sets a cover image nor the example prediction has an output file).
A generic fallback image.
POST https://api.vaikerai.com/v1/models
Create a new model within your account.
Note: There is a limit of 1,000 models per account. We recommend using a single model and pushing new versions as needed.
cover_image_url (string, optional): URL of the model's cover image (must be an image file).
description (string, optional): A description of the model.
github_url (string, optional): URL to the model's source code repository on GitHub.
hardware (string, required):
The SKU of the hardware used to run the model. Possible values can be retrieved from the hardware.list
endpoint.
license_url (string, optional): URL of the model's license.
name (string, required): The name of the model. Must be unique among all models owned by the user or organization.
owner (string, required): The name of the user or organization that will own the model. This must match the user or organization associated with the API token used in the request.
paper_url (string, optional): URL of the model's associated paper (if any).
visibility (string, required): Determines whether the model should be public or private. Public models are accessible to everyone, while private models can only be viewed and run by the owner or organization members.
POST https://api.vaikerai.com/v1/models/search
Retrieve a list of public models that match a specific search query.
Note: The cover_image_url
is an HTTPS URL for an image file. It may be:
An image uploaded by the model author.
The output of an example prediction if no cover image was set.
The input of an example prediction if neither a cover image nor output file was set.
A generic fallback image.
DELETE https://api.vaikerai.com/v1/models/{model_owner}/{model_name}
Delete a specific model. Note that model deletion is subject to the following restrictions:
You can only delete models you own.
Only private models can be deleted.
Models with associated versions cannot be deleted until all versions are removed.
A successful deletion will return a 204 No Content
response, indicating the model has been removed.
model_owner (string, required): The name of the user or organization that owns the model.
model_name (string, required): The name of the model.
GET https://api.vaikerai.com/v1/models/{model_owner}/{model_name}
Retrieve detailed information about a specific model.
Note: The cover_image_url
is an HTTPS URL pointing to an image file. It can be:
An image uploaded by the model author.
The output of the example prediction if no cover image is set.
The input of the example prediction if there is no cover image or output file.
A generic fallback image.
The default_example
is a prediction created with this model.
The latest_version
is the most recent version of the model that was pushed.
model_owner (string, required): The name of the user or organization that owns the model.
model_name (string, required): The name of the model.
POST https://api.vaikerai.com/v1/models/{model_owner}/{model_name}/predictions
Initiate a new prediction using an official model by providing the required input parameters.
Note: Predictions can take several seconds or more to complete. The output is not immediately available. To retrieve the final result, you can either provide a webhook URL for notification or poll the "Get a Prediction" endpoint until the prediction is complete.
All input parameters, output values, and logs are automatically deleted after one hour by default. Output files are served from files.vaikerai.com
and its subdomains. If you use an allowlist for external domains, ensure this domain is included.
model_owner (string, required): The name of the user or organization that owns the model.
model_name (string, required): The name of the model.
input (object, required): The input for the model in JSON format. The input schema depends on the model being used. To view the available inputs, click the "API" tab on the model's page or retrieve the model version and check its openapi_schema
property. For example, stability-ai/sdxl
accepts prompt
as an input.
Files should be passed as HTTP URLs or data URLs:
HTTP URL: Use this when you have a large file (>256 KB), want to reuse the file, or need to associate your prediction metadata with your input files.
Data URL: Use this when you have a small file (≤256 KB), do not want to upload and host the file, or do not need to reuse the file (VaikerAI will not store it).
stream (boolean, deprecated): This field is deprecated and no longer required. If the model supports streaming, the returned prediction will always have a stream
entry in its url
property.
webhook (string): An HTTPS URL to receive a notification when the prediction has new output. The webhook will be a POST request with the same body as the "Get a Prediction" response. If there are network issues, the webhook will be retried several times, so ensure it can be safely called multiple times. VaikerAI will not follow redirects, so specify a URL that resolves directly.
webhook_events_filter (array): By default, requests are sent to your webhook URL when there are new outputs or the prediction is complete. You can customize this by specifying webhook_events_filter
:
start: Triggered when the prediction starts.
output: Triggered each time the prediction generates output (predictions can have multiple outputs).
logs: Triggered each time the prediction generates log output.
completed: Triggered when the prediction reaches a terminal state (succeeded, canceled, failed).
Example request to send only start and completion notifications:
For event types output
and logs
, requests are sent at most once every 500ms. If you request start
and completed
webhooks, they will always be sent regardless of throttling.
GET https://api.vaikerai.com/v1/models/{model_owner}/{model_name}/versions
Retrieve a list of all versions of a specific model, sorted with the most recent version first.
model_owner (string, required): The name of the user or organization that owns the model.
model_name (string, required): The name of the model.
DELETE https://api.vaikerai.com/v1/models/{model_owner}/{model_name}/versions/{version_id}
Delete a specific version of a model, along with all associated predictions and output files.
You can only delete versions of models that you own.
You can only delete versions of private models.
You cannot delete a version if someone other than you has run predictions with it.
You cannot delete a version if it is being used as the base model for a fine-tune/training.
You cannot delete a version if it has an associated deployment.
You cannot delete a version if another model version overrides it.
An empty 202 status code, indicating that the deletion request has been accepted. The deletion process might take a few minutes to complete.
model_owner (string, required): The name of the user or organization that owns the model.
model_name (string, required): The name of the model.
version_id (string, required): The ID of the version.
GET https://api.vaikerai.com/v1/models/{model_owner}/{model_name}/versions/{version_id}
Retrieve details about a specific version of a model.
The openapi_schema
property describes the model's inputs and outputs using OpenAPI Schema Objects.
vaikerai/hello-world
):vaikerai/hello-world
):For more details, refer to the documentation on Cog's supported input and output types.
model_owner (string, required): The name of the user or organization that owns the model.
model_name (string, required): The name of the model.
version_id (string, required): The ID of the version.
POST https://api.vaikerai.com/v1/models/{model_owner}/{model_name}/versions/{version_id}/trainings
Initiate a new training session for the specified model version.
Training can take several minutes or more to complete. You can track the status by either:
Providing a webhook URL to be notified when training is complete.
Polling the "Get a Training" endpoint until the training finishes.
Upon completion, a new model version is created at the specified destination.
model_owner (string, required): The user or organization that owns the model.
model_name (string, required): The name of the model.
version_id (string, required): The ID of the model version to train.
destination (string, required): The target model's destination in the format {destination_model_owner}/{destination_model_name}
. Must be an existing model owned by the requestor.
input (object, required): Contains the inputs required for the model's train()
function.
webhook (string, optional): HTTPS URL to receive a POST request when the training completes.
webhook_events_filter (array, optional): Specify events that trigger webhook notifications:
start
: When training starts.
output
: When an output is generated (trainings can produce multiple outputs).
logs
: When a log is generated.
completed
: When the training reaches a terminal state (succeeded/canceled/failed).
GET https://api.vaikerai.com/v1/predictions
Retrieve a paginated list of predictions you have created, either through the API or the website. Returns up to 100 records per page.
id: Unique identifier for the prediction.
source: Indicates how the prediction was created (web
or api
).
status: Current status of the prediction.
urls: Contains URLs for further API requests related to the prediction.
model: The model identifier in the format {model_owner}/{model_name}
.
version: The unique ID of the model version used to create the prediction.
data_removed: Indicates if the input and output data have been deleted.
POST https://api.vaikerai.com/v1/predictions
Initiate a new prediction using the specified model version and input parameters.
Predictions may take several seconds or longer to complete. To retrieve the final output, either:
Provide a webhook URL to be notified when the prediction is ready.
Poll the "Get a Prediction" endpoint until the prediction is finished.
Input and output data (including files) are automatically deleted one hour after the prediction is created. If you wish to keep any output files, be sure to save them before they are removed.
Output files are served via files.vaikerai.com
and its subdomains. If you maintain an allowlist of domains for your assets, add files.vaikerai.com
to it.
input (object, required): The model's input parameters, provided as a JSON object. The input schema varies by model. To view available inputs, refer to the "API" tab of the model you are using, or retrieve the model version's openapi_schema
property. For example, the model stability-ai/sdxl
accepts prompt
as an input.
Files can be provided as either HTTP URLs or data URLs:
HTTP URL: Use for large files (>256kb), files you plan to reuse, or when associating input files with prediction metadata.
Data URL: Use for small files (≤256kb), files you don’t need to upload elsewhere, or files you don’t need to store (VaikerAI won’t retain them).
stream (boolean, deprecated): This field is no longer needed. The returned prediction will always include a stream
entry in the urls
property if the model supports streaming.
version (string, required): The ID of the model version you want to use.
webhook (string, optional): HTTPS URL for receiving a webhook when the prediction has new output. The webhook will be a POST request with the same structure as the response from the "Get a Prediction" operation. If network issues occur, the webhook will retry multiple times, so ensure it can be safely called multiple times. VaikerAI will not follow redirects, so the URL must resolve directly.
webhook_events_filter (array, optional): Customize which events trigger webhook notifications. By default, a webhook is triggered for any new output or when the prediction completes. Available events:
start
: When the prediction starts.
output
: Each time the prediction generates an output (predictions may generate multiple outputs).
logs
: Each time a log is generated.
completed
: When the prediction reaches a terminal state (succeeded/canceled/failed).
GET https://api.vaikerai.com/v1/predictions/{prediction_id}
Retrieve the current status and details of a specific prediction.
starting: The prediction is starting up. If this status persists for several seconds, it may indicate that a new worker is being initiated.
processing: The model's predict()
function is currently running.
succeeded: The prediction completed successfully.
failed: An error occurred during the prediction process.
canceled: The prediction was canceled by the user.
On successful completion, the metrics
object will include predict_time
, indicating the CPU or GPU time (in seconds) used by the prediction.
All input parameters, output values, and logs are automatically deleted after one hour for API-created predictions. After this, the output key will remain, but its value will be null
.
Output files are served via files.vaikerai.com
and its subdomains. If you maintain an allowlist of domains for your assets, add files.vaikerai.com
to it.
prediction_id (string, required): The unique ID of the prediction to retrieve.
POST https://api.vaikerai.com/v1/predictions/{prediction_id}/cancel
Cancels an ongoing prediction.
prediction_id: The unique identifier of the prediction to cancel.
GET https://api.vaikerai.com/v1/trainings
Retrieves a paginated list of all the trainings you have created, including those created via the API and the website. The response returns up to 100 records per page.
The response is a JSON object containing an array of training objects, sorted by the most recent first:
id: Unique ID of the training.
source: Origin of the training (either web
or api
).
status: The current status of the training. Refer to the "Get a Training" section for possible values.
urls: Object containing URLs to interact with the training, such as getting the training's details or canceling it.
version: The unique ID of the model version used for the training.
GET https://api.vaikerai.com/v1/trainings/{training_id}
Retrieves the current state and details of a specific training.
The response is a JSON object containing the training details:
starting: The training is initializing. If this status persists, it might indicate that a new worker is being prepared.
processing: The model's train()
method is currently executing.
succeeded: The training completed successfully.
failed: The training encountered an error.
canceled: The training was canceled.
In case of success, the output
object will contain the results, such as model weights, and any associated files will be available via HTTPS URLs. For failed trainings, the error
field will describe the issue.
Metrics such as predict_time
will show the processing time (in seconds) consumed by the training.
POST https://api.vaikerai.com/v1/trainings/{training_id}/cancel
Cancels an ongoing training.
training_id: The unique identifier of the training to cancel.
GET https://api.vaikerai.com/v1/webhooks/default/secret
Retrieves the signing secret for your default webhook. This secret is used to verify that incoming webhook requests are authentic and sent by VaikerAI.
The response is a JSON object containing your secret key:
VaikerAI imposes rate limits on API usage:
Create Prediction: 600 requests per minute.
All Other Endpoints: 3000 requests per minute.
If a rate limit is exceeded, you will receive a 429 status response:
For higher limits, please contact us.
The OpenAPI (formerly Swagger) specification provides a standardized way to describe HTTP APIs, detailing available endpoints, request/response formats, and other metadata.
You can download VaikerAI's OpenAPI schema at https://api.vaikerai.com/openapi.json
.