# Create a chat completion Source: https://developers.liara.ir/ai-chat-completions/chat-completions/create-a-chat-completion /spec/ai-chat-completions.yaml post /api/{workspaceID}/v1/chat/completions Creates a model response for the given conversation. Supports streaming via SSE, tool calling, and multi-modal input (text, images, files). # List available models Source: https://developers.liara.ir/ai-chat-completions/models/list-available-models /spec/ai-chat-completions.yaml get /api/{workspaceID}/v1/models Lists all AI models available for inference in an OpenAI-compatible format. # Create embeddings Source: https://developers.liara.ir/ai-embeddings/embeddings/create-embeddings /spec/ai-embeddings.yaml post /api/{workspaceID}/v1/embeddings Generates embeddings for the given input text. Supports single strings or arrays of strings. Response includes token usage and cost information. # Edit images Source: https://developers.liara.ir/ai-image-generation/image-edits/edit-images /spec/ai-image-generation.yaml post /api/{workspaceID}/v1/images/edits Edits an existing image based on a text prompt. Requires `multipart/form-data` content type. Supports up to 16 input images. A mask image can be provided for inpainting operations. # Generate images Source: https://developers.liara.ir/ai-image-generation/image-generations/generate-images /spec/ai-image-generation.yaml post /api/{workspaceID}/v1/images/generations Generates images from a text prompt. Supports models from OpenAI (gpt-image-1, gpt-image-2) and Google Gemini (Gemini image models). OpenAI models accept size values like `1024x1024`, `1536x1024`, `1024x1536`, or `auto`. Gemini models accept aspect ratio values like `1:1`, `2:3`, `16:9`, etc. # Create an API key Source: https://developers.liara.ir/ai-keys/api-keys/create-an-api-key /spec/ai-keys.yaml post /v1/keys Creates a new API key associated with one or more workspaces. The response includes the key token which is only shown once upon creation. # Delete an API key Source: https://developers.liara.ir/ai-keys/api-keys/delete-an-api-key /spec/ai-keys.yaml delete /v1/keys/{keyID} Soft-deletes an API key. The key will be marked as deleted but not permanently removed. # List API keys Source: https://developers.liara.ir/ai-keys/api-keys/list-api-keys /spec/ai-keys.yaml get /v1/keys Lists all API keys owned by the authenticated user, including workspace associations. # Update an API key Source: https://developers.liara.ir/ai-keys/api-keys/update-an-api-key /spec/ai-keys.yaml put /v1/keys/{keyID} Updates an API key's name, workspaces, or enabled status. # Get log details (API key auth) Source: https://developers.liara.ir/ai-logs/logs/get-log-details-api-key-auth /spec/ai-logs.yaml get /v1/workspaces/{workspaceID}/logs/{logID} Gets detailed information about a specific log entry. Authenticated via API key. # Get log details (playground auth) Source: https://developers.liara.ir/ai-logs/logs/get-log-details-playground-auth /spec/ai-logs.yaml get /v1/workspaces/{workspaceID}/playground/logs/{logID} Gets detailed information about a specific playground log entry. Authenticated via JWT. # List logs Source: https://developers.liara.ir/ai-logs/logs/list-logs /spec/ai-logs.yaml get /v1/workspaces/{workspaceID}/logs Lists paginated request logs for a workspace. Date range is constrained by the workspace plan's log retention period. For image operations, both generations and edits are included when filtering by image routes. # Get a model Source: https://developers.liara.ir/ai-models/model-catalog-v1/get-a-model /spec/ai-models.yaml get /v1/models/{modelID} Gets a single model by its ID. No authentication required. # List all models Source: https://developers.liara.ir/ai-models/model-catalog-v1/list-all-models /spec/ai-models.yaml get /v1/models Returns all available AI models with full details. No authentication required. # List models with filters Source: https://developers.liara.ir/ai-models/model-catalog-v2/list-models-with-filters /spec/ai-models.yaml get /v2/models Returns paginated model list with filtering, sorting, and search capabilities. No authentication required. Page size is 20. # Playground chat completion Source: https://developers.liara.ir/ai-playground/playground-chat/playground-chat-completion /spec/ai-playground.yaml post /api/v1/{workspaceID}/playground/chat/completions Creates a chat completion in the playground. Requires `ai.operate` or `ai.manage` permission. Uses the same request/response format as the API key chat completion endpoint. # Playground list models Source: https://developers.liara.ir/ai-playground/playground-chat/playground-list-models /spec/ai-playground.yaml get /api/v1/{workspaceID}/playground/models Lists available models in the playground. Requires `ai.operate` or `ai.manage` permission. Returns models in OpenAI-compatible format. # Playground image edit Source: https://developers.liara.ir/ai-playground/playground-images/playground-image-edit /spec/ai-playground.yaml post /api/v1/{workspaceID}/playground/images/edits Edits images in the playground. Requires `ai.operate` or `ai.manage` permission. Requires `multipart/form-data` content type. # Playground image generation Source: https://developers.liara.ir/ai-playground/playground-images/playground-image-generation /spec/ai-playground.yaml post /api/v1/{workspaceID}/playground/images/generations Generates images in the playground. Requires `ai.operate` or `ai.manage` permission. Uses the same request/response format as the API key image generation endpoint. # Get model limits Source: https://developers.liara.ir/ai-workspaces/model-limits/get-model-limits /spec/ai-workspaces.yaml get /v1/workspaces/{workspaceID}/models/{modelID}/limits Gets the minimum balance and maximum tokens for a specific model within a workspace. Only applies to chat completion models. # Change provider preferences Source: https://developers.liara.ir/ai-workspaces/workspace-actions/change-provider-preferences /spec/ai-workspaces.yaml patch /v1/workspaces/{workspaceID}/change-provider-preferences Changes the provider routing preference for a workspace. This affects how requests are routed to AI providers. # Resize workspace (change plan) Source: https://developers.liara.ir/ai-workspaces/workspace-actions/resize-workspace-change-plan /spec/ai-workspaces.yaml post /v1/workspaces/{workspaceID}/resize Changes the plan of a workspace. The user must have sufficient balance for the new plan's hourly price. # Unfreeze workspace Source: https://developers.liara.ir/ai-workspaces/workspace-actions/unfreeze-workspace /spec/ai-workspaces.yaml post /v1/workspaces/{workspaceID}/unfreeze Unfreezes a frozen workspace. The user must have sufficient balance to cover the workspace's hourly plan cost. # Get free token usage Source: https://developers.liara.ir/ai-workspaces/workspace-activity/get-free-token-usage /spec/ai-workspaces.yaml get /v1/workspaces/{workspaceID}/free-tokens Calculates the free token usage for a workspace. # Get workspace activity Source: https://developers.liara.ir/ai-workspaces/workspace-activity/get-workspace-activity /spec/ai-workspaces.yaml get /v1/workspaces/{workspaceID}/activity Gets aggregated usage activity for a workspace grouped by date and model. Time filter availability depends on the workspace plan: - `base`: hour, day, week - `standard`: hour, day, week, month - `pro`: all filters available # Check workspace name availability Source: https://developers.liara.ir/ai-workspaces/workspaces/check-workspace-name-availability /spec/ai-workspaces.yaml get /v1/workspaces/{workspaceName}/check-availability Checks if a workspace name is available for use. # Create a workspace Source: https://developers.liara.ir/ai-workspaces/workspaces/create-a-workspace /spec/ai-workspaces.yaml post /v1/workspaces Creates a new AI workspace. Only one free (base) workspace is allowed per user. The workspace name must be unique. # Delete a workspace Source: https://developers.liara.ir/ai-workspaces/workspaces/delete-a-workspace /spec/ai-workspaces.yaml delete /v1/workspaces/{workspaceID} Soft-deletes a workspace. The workspace will be marked as deleted but not permanently removed. # Get workspace details Source: https://developers.liara.ir/ai-workspaces/workspaces/get-workspace-details /spec/ai-workspaces.yaml get /v1/workspaces/{workspaceID} Gets detailed information about a specific workspace. # List workspaces Source: https://developers.liara.ir/ai-workspaces/workspaces/list-workspaces /spec/ai-workspaces.yaml get /v1/workspaces Lists all workspaces owned by the authenticated user. # Backup a database Source: https://developers.liara.ir/dbass/backups/backup-a-database /spec/dbaas.yaml post /v1/databases/{id}/backups backup a database that user owns # Download a backup Source: https://developers.liara.ir/dbass/backups/download-a-backup /spec/dbaas.yaml post /v1/databases/{id}/backups/{name}/download download a backup that user owns # Get all backups Source: https://developers.liara.ir/dbass/backups/get-all-backups /spec/dbaas.yaml get /v1/databases/{id}/backups get all backups that user owns # Change control-panel status Source: https://developers.liara.ir/dbass/databases/change-control-panel-status /spec/dbaas.yaml post /v1/databases/{id}/control-panel/{status} change control-panel status that user owns # Change public network status Source: https://developers.liara.ir/dbass/databases/change-public-network-status /spec/dbaas.yaml patch /v1/databases/{id}/public-network/{status} change public network status that user owns # Create a database Source: https://developers.liara.ir/dbass/databases/create-a-database /spec/dbaas.yaml post /v1/databases create a database that user owns # Delete a database Source: https://developers.liara.ir/dbass/databases/delete-a-database /spec/dbaas.yaml delete /v1/databases/{id} delete a database that user owns # Get a database Source: https://developers.liara.ir/dbass/databases/get-a-database /spec/dbaas.yaml get /v1/databases/{id} get a database that user owns # Get all databases Source: https://developers.liara.ir/dbass/databases/get-all-databases /spec/dbaas.yaml get /v1/databases get all databases that user owns # Power on or power off a database Source: https://developers.liara.ir/dbass/databases/power-on-or-power-off-a-database /spec/dbaas.yaml post /v1/databases/{id}/actions/scale power on or power off a database that user owns # Resize a database Source: https://developers.liara.ir/dbass/databases/resize-a-database /spec/dbaas.yaml post /v1/databases/{id}/resize resize a database that user owns # Settings a database Source: https://developers.liara.ir/dbass/databases/settings-a-database /spec/dbaas.yaml patch /v1/databases/{id}/settings settings a database that user owns # Get events of the database Source: https://developers.liara.ir/dbass/get-events-of-the-database /spec/dbaas.yaml get /v1/databases/{name}/events get events of the database owned by user # Get cpu reports of database Source: https://developers.liara.ir/dbass/reports/get-cpu-reports-of-database /spec/dbaas.yaml get /v1/databases/{id}/metrics/cpu get cpu reports of database that user owns # Get memory reports of database Source: https://developers.liara.ir/dbass/reports/get-memory-reports-of-database /spec/dbaas.yaml get /v1/databases/{id}/metrics/memory get memory reports of database that user owns # Get network-receive reports of database Source: https://developers.liara.ir/dbass/reports/get-network-receive-reports-of-database /spec/dbaas.yaml get /v1/databases/{id}/metrics/network-receive get network-receive reports of database that user owns # Get network-transmit reports of database Source: https://developers.liara.ir/dbass/reports/get-network-transmit-reports-of-database /spec/dbaas.yaml get /v1/databases/{id}/metrics/network-transmit get network-transmit reports of database that user owns # Get summary reports of database Source: https://developers.liara.ir/dbass/reports/get-summary-reports-of-database /spec/dbaas.yaml get /v1/databases/{id}/metrics/summary get summary reports of database that user owns # check nameserver Source: https://developers.liara.ir/dns/check-name-servers/check-nameserver /spec/dns.yaml put /api/v1/zones/{zone}/check check nameserver of zone # Create dns record Source: https://developers.liara.ir/dns/dns-record/create-dns-record /spec/dns.yaml post /api/v1/zones/{zone}/dns-records Creates a new dns record, returns the dns record on creation # delete dns record Source: https://developers.liara.ir/dns/dns-record/delete-dns-record /spec/dns.yaml delete /api/v1/zones/{zone}/dns-records/{id} Delete dns record from this zone # edit dns record Source: https://developers.liara.ir/dns/dns-record/edit-dns-record /spec/dns.yaml put /api/v1/zones/{zone}/dns-records/{id} you can not edit type of dns record # Get all dns record Source: https://developers.liara.ir/dns/dns-record/get-all-dns-record /spec/dns.yaml get /api/v1/zones/{zone}/dns-records Get all Dns Records on this zone # Get dns record Source: https://developers.liara.ir/dns/dns-record/get-dns-record /spec/dns.yaml get /api/v1/zones/{zone}/dns-records/{id} Get Dns Record data on this zone # Create Zone Source: https://developers.liara.ir/dns/zone/create-zone /spec/dns.yaml post /api/v1/zones creates a new zone on dns server # Delete Zone Source: https://developers.liara.ir/dns/zone/delete-zone /spec/dns.yaml delete /api/v1/zones/{zone} Deletes this zone, all dns records # Get Zone Source: https://developers.liara.ir/dns/zone/get-zone /spec/dns.yaml get /api/v1/zones/{zone} Get this zone, all dns records # List all zones Source: https://developers.liara.ir/dns/zone/list-all-zones /spec/dns.yaml get /api/v1/zones list all zones that user owns # Create file or dir in FileBrowser Source: https://developers.liara.ir/file-browser/disks/create-file-or-dir-in-filebrowser /spec/file-browser.yaml post /v1/projects/{projectID}/disks/{diskName}/create # Create link for file in FileBrowser Source: https://developers.liara.ir/file-browser/disks/create-link-for-file-in-filebrowser /spec/file-browser.yaml post /v1/projects/{projectID}/disks/{diskName}/createLink # Delete file or dir in FileBrowser Source: https://developers.liara.ir/file-browser/disks/delete-file-or-dir-in-filebrowser /spec/file-browser.yaml delete /v1/projects/{projectID}/disks/{diskName}/delete # Extract file in FileBrowser Source: https://developers.liara.ir/file-browser/disks/extract-file-in-filebrowser /spec/file-browser.yaml post /v1/projects/{projectID}/disks/{diskName}/extract # Get list from FileBrowser Source: https://developers.liara.ir/file-browser/disks/get-list-from-filebrowser /spec/file-browser.yaml get /v1/projects/{projectID}/disks/{diskName}/list # Rename file or dir in FileBrowser Source: https://developers.liara.ir/file-browser/disks/rename-file-or-dir-in-filebrowser /spec/file-browser.yaml post /v1/projects/{projectID}/disks/{diskName}/rename # Search file or dir in FileBrowser Source: https://developers.liara.ir/file-browser/disks/search-file-or-dir-in-filebrowser /spec/file-browser.yaml get /v1/projects/{projectID}/disks/{diskName}/search # Serve file from FileBrowser Source: https://developers.liara.ir/file-browser/disks/serve-file-from-filebrowser /spec/file-browser.yaml get /v1/projects/{projectID}/disks/{diskName}/serve # Upload file in FileBrowser Source: https://developers.liara.ir/file-browser/disks/upload-file-in-filebrowser /spec/file-browser.yaml post /v1/projects/{projectID}/disks/{diskName}/upload # Create a new disk for a VM Source: https://developers.liara.ir/iaas/vms/create-a-new-disk-for-a-vm /spec/Iaas.yaml post /vm/disk/{id} create a disk for a vm that user owns # Create a vm Source: https://developers.liara.ir/iaas/vms/create-a-vm /spec/Iaas.yaml post /vm create a vm that user owns # Delete a disk Source: https://developers.liara.ir/iaas/vms/delete-a-disk /spec/Iaas.yaml delete /vm/disk/{vmID}/{diskID} Delete a disk of a vm that user owns # Delete a vm Source: https://developers.liara.ir/iaas/vms/delete-a-vm /spec/Iaas.yaml delete /vm/{id} delete a vm that user owns # Extend a vm Disk Source: https://developers.liara.ir/iaas/vms/extend-a-vm-disk /spec/Iaas.yaml post /vm/disk/{vmID}/{diskID} extend a vm that user owns # Get all available operating systems Source: https://developers.liara.ir/iaas/vms/get-all-available-operating-systems /spec/Iaas.yaml get /oss get all available operating systems # Get all plans Source: https://developers.liara.ir/iaas/vms/get-all-plans /spec/Iaas.yaml get /plans get all Iaas plans # Get all vms Source: https://developers.liara.ir/iaas/vms/get-all-vms /spec/Iaas.yaml get /vm get all vms that user owns # Get disk details Source: https://developers.liara.ir/iaas/vms/get-disk-details /spec/Iaas.yaml get /vm/disk/{id} get disk details of a vm that user owns # Get traffic graph of a vm Source: https://developers.liara.ir/iaas/vms/get-traffic-graph-of-a-vm /spec/Iaas.yaml get /vm/traffic-graph/{id} get traffic graph of a vm that user owns # Get traffic volume of a vm Source: https://developers.liara.ir/iaas/vms/get-traffic-volume-of-a-vm /spec/Iaas.yaml get /vm/traffic-volume/{id} get traffic volume of a vm that user owns # Get vm details Source: https://developers.liara.ir/iaas/vms/get-vm-details /spec/Iaas.yaml get /vm/{id} get a vm that user owns # Get vm operations Source: https://developers.liara.ir/iaas/vms/get-vm-operations /spec/Iaas.yaml get /vm/operation/{id} get operations of a vm that user owns # Reset a vm network Source: https://developers.liara.ir/iaas/vms/reset-a-vm-network /spec/Iaas.yaml post /vm/reset-network/{id} reset network a vm that user owns # Reset a vm password Source: https://developers.liara.ir/iaas/vms/reset-a-vm-password /spec/Iaas.yaml post /vm/reset-password/{id} reset password of a vm that user owns # Resize a vm Source: https://developers.liara.ir/iaas/vms/resize-a-vm /spec/Iaas.yaml patch /vm/resize/{id} resize a vm that user owns # Set vm power Source: https://developers.liara.ir/iaas/vms/set-vm-power /spec/Iaas.yaml patch /vm/power/{id} set power of a vm that user owns # Unfreeze a vm Source: https://developers.liara.ir/iaas/vms/unfreeze-a-vm /spec/Iaas.yaml post /vm/unfreeze/{id} unfreeze a vm that user owns # add mail account Source: https://developers.liara.ir/mail/accounts/add-mail-account /spec/mail.yaml post /api/v1/mails/{mailServerID}/accounts # check if mail account is available Source: https://developers.liara.ir/mail/accounts/check-if-mail-account-is-available /spec/mail.yaml get /api/v1/mails/{mailServerID}/accounts/{accountName}/check-availability # delete mail account Source: https://developers.liara.ir/mail/accounts/delete-mail-account /spec/mail.yaml delete /api/v1/mails/{mailServerID}/accounts/{accountID} # get all mail accounts Source: https://developers.liara.ir/mail/accounts/get-all-mail-accounts /spec/mail.yaml get /api/v1/mails/{mailServerID}/accounts # download attachment Source: https://developers.liara.ir/mail/attachments/download-attachment /spec/mail.yaml get /api/v1/mails/{mailServerID}/messages/{messageID}/attachments/{attachmentID} # get all attachments for message Source: https://developers.liara.ir/mail/attachments/get-all-attachments-for-message /spec/mail.yaml get /api/v1/mails/{mailServerID}/messages/{messageID}/attachments # get all events for message Source: https://developers.liara.ir/mail/event/get-all-events-for-message /spec/mail.yaml get /api/v1/mails/{mailServerID}/messages/{messageID}/events # add address endpoint to forwarding mails Source: https://developers.liara.ir/mail/forward/add-address-endpoint-to-forwarding-mails /spec/mail.yaml post /api/v1/mails/{mailServerID}/accounts/{accountID}/forwards # delete extra endpoint address Source: https://developers.liara.ir/mail/forward/delete-extra-endpoint-address /spec/mail.yaml delete /api/v1/mails/{mailServerID}/accounts/{accountID}/forwards/{addressID} # get all extra address to forwarding mails Source: https://developers.liara.ir/mail/forward/get-all-extra-address-to-forwarding-mails /spec/mail.yaml get /api/v1/mails/{mailServerID}/accounts/{accountID}/forwards # add inbound rule. Source: https://developers.liara.ir/mail/inboundrules/add-inbound-rule /spec/mail.yaml post /api/v1/mails/{mailServerID}/inboundrules # delete inbound rule. Source: https://developers.liara.ir/mail/inboundrules/delete-inbound-rule /spec/mail.yaml delete /api/v1/mail/{mailServerID}/inboundrules/{inboundruleID} # get all inbound rules. Source: https://developers.liara.ir/mail/inboundrules/get-all-inbound-rules /spec/mail.yaml get /api/v1/mails/{mailServerID}/inboundrules # check if domain name is available Source: https://developers.liara.ir/mail/mails/check-if-domain-name-is-available /spec/mail.yaml get /api/v1/mails/{domain}/check-availability # count number of sent mails every day Source: https://developers.liara.ir/mail/mails/count-number-of-sent-mails-every-day /spec/mail.yaml get /api/v1/mails/{mailServerID}/counts # create mail server Source: https://developers.liara.ir/mail/mails/create-mail-server /spec/mail.yaml post /api/v1/mails # delete mail server Source: https://developers.liara.ir/mail/mails/delete-mail-server /spec/mail.yaml delete /api/v1/mails/{mailServerID} # edit mail server Source: https://developers.liara.ir/mail/mails/edit-mail-server /spec/mail.yaml patch /api/v1/mails/{mailServerID} # gain more info on recent usage Source: https://developers.liara.ir/mail/mails/gain-more-info-on-recent-usage /spec/mail.yaml get /api/v1/mails/{mailServerID}/metrics # get all mail servers Source: https://developers.liara.ir/mail/mails/get-all-mail-servers /spec/mail.yaml get /api/v1/mails # get single mail server Source: https://developers.liara.ir/mail/mails/get-single-mail-server /spec/mail.yaml get /api/v1/mails/{mailServerID} # mail server check dns status Source: https://developers.liara.ir/mail/mails/mail-server-check-dns-status /spec/mail.yaml get /api/v1/mails/{mailServerID}/dns-check # unfreeze mail server - If you had reserved a plan, it will be your new plan. Source: https://developers.liara.ir/mail/mails/unfreeze-mail-server--if-you-had-reserved-a-plan-it-will-be-your-new-plan /spec/mail.yaml patch /api/v1/mails/{mailServerID}/unfreeze # delete a message permenantly Source: https://developers.liara.ir/mail/messages/delete-a-message-permenantly /spec/mail.yaml delete /api/v1/mails/{mailServerID}/messages/{messageID}/ # generate temporary access to email html Source: https://developers.liara.ir/mail/messages/generate-temporary-access-to-email-html /spec/mail.yaml post /api/v1/mails/{mailServerID}/messages/{messageID}/temporary-access # get all mails Source: https://developers.liara.ir/mail/messages/get-all-mails /spec/mail.yaml get /api/v1/mails/{mailServerID}/messages # get single mail Source: https://developers.liara.ir/mail/messages/get-single-mail /spec/mail.yaml get /api/v1/mails/{mailServerID}/messages/{messageID} # get single mail html Source: https://developers.liara.ir/mail/messages/get-single-mail-html /spec/mail.yaml get /api/v1/mails/{mailServerID}/messages/{messageID}/render # send a mail Source: https://developers.liara.ir/mail/messages/send-a-mail /spec/mail.yaml post /api/v1/mails/{mailServerID}/messages # trash and untrash a message Source: https://developers.liara.ir/mail/messages/trash-and-untrash-a-message /spec/mail.yaml patch /api/v1/mails/{mailServerID}/messages/{messageID}/ # change mail server plan Source: https://developers.liara.ir/mail/plan/change-mail-server-plan /spec/mail.yaml post /api/v1/mails/{mailServerID}/plan Upgrades take effect immediately, while downgrades are scheduled and applied after the current plan ends. Click on the request body schema to see all available plans. # get cuurent mail server plan history Source: https://developers.liara.ir/mail/plan/get-cuurent-mail-server-plan-history /spec/mail.yaml get /api/v1/mails/{mailServerID}/plan # remove a reserved plan Source: https://developers.liara.ir/mail/plan/remove-a-reserved-plan /spec/mail.yaml delete /api/v1/mails/{mailServerID}/plan Click on the request body schema to see all available plans. # delete smtp credential Source: https://developers.liara.ir/mail/smtp/delete-smtp-credential /spec/mail.yaml delete /api/v1/mails/{mailServerID}/smtp-credentials/{username} # generate credentials to connet mail server with SMTP Source: https://developers.liara.ir/mail/smtp/generate-credentials-to-connet-mail-server-with-smtp /spec/mail.yaml post /api/v1/mails/{mailServerID}/smtp-credentials # get credential to connect to mail server with SMTP Source: https://developers.liara.ir/mail/smtp/get-credential-to-connect-to-mail-server-with-smtp /spec/mail.yaml get /api/v1/mails/{mailServerID}/smtp-credentials # revoke credentials to connect mail server with SMTP Source: https://developers.liara.ir/mail/smtp/revoke-credentials-to-connect-mail-server-with-smtp /spec/mail.yaml patch /api/v1/mails/{mailServerID}/smtp-credentials # create a new tag Source: https://developers.liara.ir/mail/tags/create-a-new-tag /spec/mail.yaml post /api/v1/mails/{mailServerID}/tags # get all tags Source: https://developers.liara.ir/mail/tags/get-all-tags /spec/mail.yaml get /api/v1/mails/{mailServerID}/tags # get all tags Source: https://developers.liara.ir/mail/tags/get-all-tags-1 /spec/mail.yaml get /api/v1/mails/{mailServerID}/tags/stats # change Bucket Access Policy Source: https://developers.liara.ir/object-storage/bucket/change-bucket-access-policy /spec/object-storage.yaml patch /api/v1/buckets/{bucket}/type/{permission} Change Bucket Access policy on an object storage ( public / private ) # Check Bucket availability Source: https://developers.liara.ir/object-storage/bucket/check-bucket-availability /spec/object-storage.yaml get /api/v1/buckets/{bucket}/check-availability Check if you can create Bucket with specified Name. # Create Bucket Source: https://developers.liara.ir/object-storage/bucket/create-bucket /spec/object-storage.yaml post /api/v1/buckets creates a new bucket on an object storage # Destroy Bucket Source: https://developers.liara.ir/object-storage/bucket/destroy-bucket /spec/object-storage.yaml delete /api/v1/buckets/{bucket} Delete Bucket on an object storage # Get Single Buckets Source: https://developers.liara.ir/object-storage/bucket/get-single-buckets /spec/object-storage.yaml get /api/v1/buckets/{bucket} # List all Buckets Source: https://developers.liara.ir/object-storage/bucket/list-all-buckets /spec/object-storage.yaml get /api/v1/buckets List all Bucket # list migration operation Source: https://developers.liara.ir/object-storage/bucket/list-migration-operation /spec/object-storage.yaml get /api/v1/buckets/migrations list migration operation # List storage service buckets Source: https://developers.liara.ir/object-storage/bucket/list-storage-service-buckets /spec/object-storage.yaml get /api/v1/buckets/migration/from List previous buckets of storage service in liara. # Migrating buckets Source: https://developers.liara.ir/object-storage/bucket/migrating-buckets /spec/object-storage.yaml post /api/v1/buckets/migrates Move data from one bucket to another # Upgrade Bucket Source: https://developers.liara.ir/object-storage/bucket/upgrade-bucket /spec/object-storage.yaml patch /api/v1/buckets/{bucket}/upgrade/{plan} Upgrade Bucket plan ( just make space bigger ) # Create Folder Source: https://developers.liara.ir/object-storage/folder/create-folder /spec/object-storage.yaml post /api/v1/buckets/{bucket}/folders Create Folder in Bucket # Delete Folder Source: https://developers.liara.ir/object-storage/folder/delete-folder /spec/object-storage.yaml delete /api/v1/buckets/{bucket}/folders Delete Folder in Bucket # Create Keys Source: https://developers.liara.ir/object-storage/key/create-keys /spec/object-storage.yaml post /api/v1/keys Create access and secret key # Delete Key Source: https://developers.liara.ir/object-storage/key/delete-key /spec/object-storage.yaml delete /api/v1/keys/{key} Delete access key # Get Key Source: https://developers.liara.ir/object-storage/key/get-key /spec/object-storage.yaml get /api/v1/keys/{key} Get a key # Get List of Keys Source: https://developers.liara.ir/object-storage/key/get-list-of-keys /spec/object-storage.yaml get /api/v1/keys # Revoke secret key Source: https://developers.liara.ir/object-storage/key/revoke-secret-key /spec/object-storage.yaml patch /api/v1/keys/{key}/revoke Revoke secret key # Update key Source: https://developers.liara.ir/object-storage/key/update-key /spec/object-storage.yaml patch /api/v1/keys/{key} Update buckets of key ( redefine ) # get statistic Source: https://developers.liara.ir/object-storage/metrics/get-statistic /spec/object-storage.yaml get /api/v1/buckets/{bucket}/metrics/{stat} # hisotrical metrics Source: https://developers.liara.ir/object-storage/metrics/hisotrical-metrics /spec/object-storage.yaml get /api/v1/buckets/{bucket}/metrics/historical # metrics summary Source: https://developers.liara.ir/object-storage/metrics/metrics-summary /spec/object-storage.yaml get /api/v1/buckets/{bucket}/metrics/summary # Delete Object Source: https://developers.liara.ir/object-storage/object/delete-object /spec/object-storage.yaml delete /api/v1/buckets/{bucket}/objects/{prefix} Delete an object from storage # Download Object Source: https://developers.liara.ir/object-storage/object/download-object /spec/object-storage.yaml get /api/v1/buckets/{bucket}/download/${object} Return presigned url for download object # Get Stat Object Source: https://developers.liara.ir/object-storage/object/get-stat-object /spec/object-storage.yaml get /api/v1/buckets/{bucket}/objects/statistics/{object} # List Objects Source: https://developers.liara.ir/object-storage/object/list-objects /spec/object-storage.yaml get /api/v1/buckets/{bucket}/objects/{prefix} Return list of objects ( max:50, min:1 ) # Upload Object Source: https://developers.liara.ir/object-storage/object/upload-object /spec/object-storage.yaml get /api/v1/buckets/{bucket}/upload/{object} Return presigned url for download object # AI API Source: https://developers.liara.ir/pages/ai AI platform API for chat completions, image generation, embeddings, and workspace management # AI API Liara's AI platform provides OpenAI-compatible endpoints for AI inference, including chat completions, image generation, and embeddings. Manage your AI resources through workspaces, API keys, and a comprehensive model catalog. ## Overview The AI API enables you to: * **Chat Completions** - Generate text responses using state-of-the-art language models with streaming support * **Image Generation** - Create and edit images from text prompts using models like GPT Image and Gemini * **Embeddings** - Generate vector embeddings for text search, clustering, and semantic analysis * **Workspaces** - Organize AI resources with plan-based billing and provider preferences * **API Keys** - Manage authentication keys scoped to specific workspaces * **Model Catalog** - Browse and filter available AI models by provider, modality, and pricing * **Logs** - Track inference requests, usage, and costs per workspace * **Playground** - Test AI inference interactively with JWT authentication ## Key Features ### OpenAI-Compatible All inference endpoints follow the OpenAI API format, making it easy to integrate with existing SDKs and tools. Simply point your OpenAI client to the Liara AI base URL with your workspace-specific path. ### Multi-Provider Support Access models from multiple providers (OpenAI, Anthropic, Google, Meta, and more) through a single API. ### Provider Preferences Control how requests are routed to providers: * **Price** - Route to the lowest-cost provider * **Throughput** - Route to the highest-throughput provider * **Latency** - Route to the lowest-latency provider ### Streaming Chat completions support Server-Sent Events (SSE) streaming for real-time token delivery, ideal for chat interfaces and interactive applications. ### Multi-Modal Input Chat completions support text, image, and file inputs, enabling vision and document understanding capabilities. ### Workspace Isolation Each workspace provides isolated billing, API keys, and usage tracking. Workspaces can be on different plans (base, standard, pro) with varying features and limits. ## Base URL For inference endpoints (chat completions, embeddings, image generation): ``` https://ai.liara.ir/api/{workspaceID}/v1 ``` For management endpoints (workspaces, keys, logs, playground, models catalog): ``` https://ai.liara.ir ``` ## Authentication The AI API uses two authentication methods: ### API Key Authentication (Inference) For chat completions, embeddings, and image generation endpoints, use an AI API key: ``` Authorization: Bearer ``` API keys are created through the management API and are scoped to specific workspaces. ### JWT Authentication (Management) For workspace, key, log, and playground endpoints, use your Liara account JWT: ``` Authorization: Bearer ``` ## Workspace Plans | Plan | Features | Log Retention | | -------- | ------------------------------------------------- | ------------- | | Base | Free tier, limited models, basic activity filters | 7 days | | Standard | More models, monthly activity filter | 30 days | | Pro | All models, all activity filters, full access | 90 days | ## Common Operations ### Making a Chat Completion When calling the chat completion endpoint, specify: * **workspaceID**: Your workspace ID in the URL path * **model**: The model ID (e.g. `openai/gpt-5`, `anthropic/claude-sonnet-4`) * **messages**: Array of conversation messages with `role` and `content` * **stream**: Set to `true` for SSE streaming ### Creating an API Key 1. Create a workspace first 2. Create an API key associated with the workspace 3. Use the returned key token for inference requests 4. The key token is only shown once upon creation ### Browsing Models The model catalog is publicly accessible without authentication. Use the v2 endpoint for advanced filtering, sorting, and pagination. ## Getting Started 1. Create a workspace using the management API 2. Create an API key scoped to your workspace 3. Use the API key to call inference endpoints 4. Monitor usage through logs and activity endpoints Explore the API sections below to learn more about each capability. # DBaaS API Source: https://developers.liara.ir/pages/dbaas Database as a Service API for managing cloud databases # DBaaS API Liara's Database as a Service (DBaaS) API provides a powerful interface for creating, managing, and scaling managed databases in the cloud. Focus on building your applications while Liara handles database administration, backups, and maintenance. ## Overview The DBaaS API enables you to: * **Create and manage databases** - Deploy managed database instances with various database engines * **Scale resources** - Resize your database plans to match your performance needs * **Manage backups** - Create on-demand backups and restore when needed * **Monitor performance** - Access CPU, memory, and network metrics * **Configure settings** - Customize database parameters for optimal performance * **Control network access** - Enable or disable public network access ## Supported Database Types Liara DBaaS supports multiple database engines including: * **MySQL** - Popular relational database * **PostgreSQL** - Advanced open-source relational database * **MongoDB** - NoSQL document database * **Redis** - In-memory data structure store * **MariaDB** - MySQL-compatible database server ## Key Features ### Managed Infrastructure Liara handles all database administration tasks including: * Automated backups * Security updates and patches * High availability configuration * Performance monitoring ### Flexible Scaling Start with a plan that matches your current needs and scale up or down as your requirements change. The API allows you to resize databases with minimal downtime. ### Backup Management * **Automated Backups**: Regular automated backups to protect your data * **Manual Backups**: Create on-demand backups before major changes * **Backup Downloads**: Download backup files for local storage or migration ### Control Panel Access Enable or disable the database control panel for visual database management through the Liara Console. ### Public Network Control Enable or disable public network access to your database for enhanced security. ## Base URL ``` https://api.iran.liara.ir ``` ## Common Operations ### Creating a Database When creating a database, specify: * **hostname**: A unique identifier for your database * **type**: The database engine (MySQL, PostgreSQL, MongoDB, etc.) * **planID**: The resource plan for your database * **version**: The database version * **publicNetwork**: Whether to enable public network access ### Monitoring Access detailed metrics including: * CPU usage over time * Memory consumption * Network receive/transmit statistics * Disk usage summary ### Events Track database events and activities through the events endpoint, useful for auditing and troubleshooting. ## Getting Started 1. Choose your database type and version 2. Select an appropriate plan based on your needs 3. Create the database using the API 4. Retrieve connection details from the database info endpoint 5. Connect your application using the provided credentials ## Best Practices * Use private networking when possible for better security * Regularly backup your database before making changes * Monitor resource usage to identify scaling needs * Keep your database version updated for security patches Explore the API endpoints below to manage your databases programmatically. # DNS API Source: https://developers.liara.ir/pages/dns DNS management API for zones and records # DNS API Liara's DNS API provides a comprehensive interface for managing DNS zones and records. Automate your DNS configuration and integrate DNS management into your applications and workflows. ## Overview The DNS API enables you to: * **Create and manage zones** - Set up DNS zones for your domains * **Manage DNS records** - Create, update, and delete various record types * **Check nameserver status** - Verify nameserver configuration * **Automate DNS management** - Integrate DNS operations into your workflows ## Key Concepts ### Zones A zone represents a domain name and all its DNS records. Each zone: * Has a unique domain name * Is assigned Liara nameservers * Has a status indicating its configuration state * Contains all DNS records for the domain ### Zone Statuses * **CREATING**: Zone is being created * **PENDING**: Waiting for nameserver configuration * **ACTIVE**: Zone is fully configured and operational * **DELETING**: Zone is being deleted ### DNS Records Supported record types include: * **A**: Maps a domain to an IPv4 address * **AAAA**: Maps a domain to an IPv6 address * **CNAME**: Creates an alias to another domain * **MX**: Specifies mail exchange servers * **TXT**: Stores text information (commonly for SPF, DKIM) * **SRV**: Defines services and their locations * **SPF**: Sender Policy Framework records * **PTR**: Reverse DNS lookup * **ALIAS**: Similar to CNAME but for root domains ## Key Features ### Easy Zone Management Create zones for your domains and Liara automatically assigns nameservers. Update your domain registrar to point to Liara's nameservers to activate the zone. ### Flexible Record Management * Create multiple records of the same type * Set custom TTL values * Update records without downtime * Delete records when no longer needed ### Nameserver Verification Check if your domain's nameservers are correctly configured to point to Liara's nameservers through the API. ## Base URL ``` https://dns-service.iran.liara.ir ``` ## Common Operations ### Creating a Zone To create a new zone: 1. Specify the domain name 2. Liara assigns nameservers to your zone 3. Update your domain registrar with the assigned nameservers 4. Check the zone status to verify activation ### Managing Records When creating DNS records, specify: * **name**: The record name (@ for root, \* for wildcard, or any valid subdomain) * **type**: The record type (A, AAAA, CNAME, MX, etc.) * **ttl**: Time to live in seconds * **contents**: Record content (varies by type) ### Record Content Examples **A Record:** ```json theme={null} { "name": "@", "type": "A", "ttl": 3600, "contents": [{"ip": "192.168.1.1"}] } ``` **MX Record:** ```json theme={null} { "name": "@", "type": "MX", "ttl": 3600, "contents": [{"priority": 10, "host": "mail.example.com"}] } ``` **CNAME Record:** ```json theme={null} { "name": "www", "type": "CNAME", "ttl": 3600, "contents": [{"host": "example.com"}] } ``` ## Getting Started 1. Create a zone for your domain 2. Note the assigned nameservers 3. Update your domain registrar with the new nameservers 4. Verify nameserver configuration using the check endpoint 5. Add DNS records as needed ## Best Practices * Use appropriate TTL values (lower for frequently changing records, higher for stable records) * Set up SPF and DKIM records for email deliverability * Create CNAME records for service aliases instead of multiple A records * Regularly audit your DNS records for accuracy * Use wildcard records carefully as they can affect subdomain routing Explore the API endpoints below to manage your DNS configuration programmatically. # File Browser API Source: https://developers.liara.ir/pages/file-browser File management API for disks attached to your applications # File Browser API Liara's File Browser API provides a web-based interface for managing files in your disks. Upload, download, organize, and manage files through a simple API or the visual file browser interface. ## Overview The File Browser API enables you to: * **Browse files and directories** - Navigate through your disk's file structure * **Upload and download files** - Transfer files to and from your disks * **Create and delete items** - Create new files and directories, delete existing ones * **Rename and organize** - Rename files and directories, organize your content * **Search and filter** - Find files quickly with search functionality * **Share files** - Generate temporary links for file sharing ## Key Features ### File Management * **List**: View files and directories with metadata (size, modification time, type) * **Search**: Find files by name within your disk * **Create**: Create new files and directories * **Rename**: Rename existing files and directories * **Delete**: Remove files and directories * **Extract**: Extract compressed archives (zip files) ### File Transfer * **Upload**: Upload files to your disk with multipart form data * **Download**: Download files directly or via generated links * **Preview**: Generate preview links for supported file types ### Sharing * **Temporary Links**: Create time-limited links for file access * **Link Expiration**: Set expiration times (1h, 6h, 1d, 3d, 7d) * **Access Types**: Configure links for preview or download ## Base URL The File Browser API uses a dynamic URL assigned by the service provider. This URL is specific to your file browser instance. ## Common Operations ### Listing Files Retrieve a list of files and directories at a specific path: * Supports pagination * Sort by name, size, or modification time * Sort in ascending or descending order ### Uploading Files Upload files using multipart form data: * Specify the target path * Optionally overwrite existing files ### Creating Directories Create new directories to organize your files: * Specify the parent path * Provide a name for the new directory ### Generating Share Links Create temporary access links: * Choose between preview or download type * Set expiration time * Use the generated token for access ## File Metadata Each file and directory includes: * **path**: Full path to the item * **name**: Item name * **size**: File size in bytes * **extension**: File extension * **isDir**: Whether the item is a directory * **isSymlink**: Whether the item is a symbolic link * **type**: MIME type for files * **mode**: File permissions * **createAt**: Creation timestamp * **modifiedAt**: Last modification timestamp ## Getting Started 1. Ensure you have a disk attached to your application 2. Access the File Browser through the API or web interface 3. Navigate to your desired location 4. Upload, create, or manage files as needed ## Use Cases ### Content Management * Upload and manage static assets for your applications * Store and organize media files * Manage configuration files ### Backup and Restore * Download backup files from your disks * Upload restored data to new disks * Transfer data between environments ### File Sharing * Generate temporary download links for clients * Share files with team members * Provide preview access to documents ## Best Practices * Organize files in a logical directory structure * Use meaningful file names for easy identification * Regularly clean up unused files to save space * Use appropriate expiration times for share links * Monitor disk usage to avoid running out of space Explore the API endpoints below to integrate file management into your applications. # IaaS API Source: https://developers.liara.ir/pages/iaas Infrastructure as a Service API for managing virtual machines # IaaS API Liara's Infrastructure as a Service (IaaS) API provides full control over virtual machines and computing resources. Deploy and manage VMs with your preferred operating system and configuration. ## Overview The IaaS API enables you to: * **Create and manage VMs** - Provision virtual machines with custom configurations * **Control power state** - Power on, power off, and restart your VMs * **Manage disks** - Create, extend, and delete disks attached to your VMs * **Access metrics** - Monitor traffic and resource usage * **Reset credentials** - Reset VM passwords when needed * **Resize plans** - Upgrade or downgrade VM plans ## Key Features ### Virtual Machine Management * **Multiple OS Support**: Choose from Ubuntu, Debian, and other popular operating systems * **Flexible Plans**: Select from various plans with different CPU, RAM, and storage configurations * **SSH Key Configuration**: Add SSH keys for secure access during creation * **IPv4 and IPv6**: Automatic IP address assignment ### Power Management * **Power On**: Start a stopped VM * **Power Off**: Gracefully shut down a VM * **Restart**: Reboot the VM ### Disk Management * **Create Disks**: Add additional storage to your VMs * **Extend Disks**: Increase disk size as needed * **Delete Disks**: Remove unused disks ### Monitoring * **Traffic Graph**: View network traffic over time * **Traffic Volume**: Monitor data transfer by destination * **Operations History**: Track VM operations and their status ## Base URL ``` https://iaas-api.liara.ir ``` ## Available Plans Choose from various plan tiers to match your computing needs: | Plan | CPU | RAM | Storage | | ---------------- | ------------------- | -------- | -------- | | standard-base-g2 | Entry-level | Basic | Standard | | standard-plus-g2 | Entry-level+ | Enhanced | Standard | | pro-g2 | Professional | High | Extended | | pro-plus-g2 | Professional+ | Higher | Extended | | express-g2 | High Performance | Maximum | Large | | express-plus-g2 | Maximum Performance | Maximum | Largest | ## Supported Operating Systems * **Ubuntu**: 24.04, 22.04 * **Debian**: 12.9 Additional operating systems may be available. Check the `/oss` endpoint for the current list. ## Common Operations ### Creating a VM When creating a VM, specify: * **name**: A unique name for your VM (lowercase) * **OS**: The operating system to install * **plan**: The resource plan * **config.SSHKeys**: SSH public keys for access (optional) ### Power Management Control VM power state: * Use the power endpoint with actions like "start", "stop", "restart" * Some operations require the VM to be in a specific state ### Disk Operations * Create new disks with specified size * Extend existing disks to increase capacity * Delete disks when no longer needed ### Network Management * Reset network configuration if needed * View traffic statistics and graphs ## VM States * **CREATED**: VM has been created * **CREATING**: VM is being provisioned * **FROZEN**: VM is frozen (unpaid or suspended) * **DELETED**: VM has been deleted * **DELETING**: VM is being deleted ## Power States * **POWERED\_ON**: VM is running * **POWERED\_OFF**: VM is stopped * **SUSPENDED**: VM is suspended ## Getting Started 1. Check available plans using the `/plans` endpoint 2. Check available operating systems using the `/oss` endpoint 3. Create a VM with your desired configuration 4. Wait for the VM to be provisioned 5. Access the VM using SSH or the provided credentials ## Best Practices * Use SSH keys instead of passwords for better security * Regularly backup important data * Monitor resource usage to optimize costs * Choose appropriate plan sizes based on your workload * Keep your operating system updated with security patches ## Security Considerations * Protect your API credentials * Use SSH keys for authentication * Configure firewall rules as needed * Regularly update your VM's operating system * Monitor for unusual activity through traffic graphs Explore the API endpoints below to manage your virtual infrastructure programmatically. # Mail API Source: https://developers.liara.ir/pages/mail Email delivery platform for incoming and outgoing mail # Mail API Liara's Mail API provides a fully featured email delivery platform for handling both incoming and outgoing emails. Build reliable email functionality into your applications with comprehensive management and tracking capabilities. ## Overview The Mail API enables you to: * **Create and manage mail servers** - Set up dedicated mail servers for your domains * **Manage email accounts** - Create and manage mailbox accounts * **Send emails** - Send emails through the API or SMTP * **Track messages** - Monitor email delivery status and events * **Configure forwarding** - Set up email forwarding to external addresses * **Manage SMTP credentials** - Generate credentials for SMTP authentication * **Handle attachments** - Send and receive email attachments * **Set up inbound rules** - Block specific senders or domains ## Key Features ### Mail Server Management Create dedicated mail servers for your domains with: * Custom domain configuration * DNS record management (SPF, DKIM, MX) * Multiple plan options for different volumes * Development and production modes ### Email Accounts * Create multiple mailbox accounts per mail server * Check account availability before creation * Manage account quotas and settings ### SMTP Integration * Generate SMTP credentials for authentication * Support for multiple credential sets * Revoke and regenerate credentials as needed ### Message Management * Send emails with HTML and text content * Attach files to outgoing messages * Track incoming and outgoing messages * View message events and delivery status * Access message content and attachments ### Forwarding * Forward incoming emails to external addresses * Configure multiple forwarding destinations * Manage forwarding rules per account ### Inbound Rules * Block specific email addresses * Block entire domains * Manage spam protection settings ## Base URL ``` https://mail-service.iran.liara.ir ``` ## DNS Configuration For your mail server to function properly, configure the following DNS records: ### MX Record Point your domain's MX record to the mail server address provided by Liara. ### SPF Record Configure SPF to authorize Liara's mail servers to send email on your domain's behalf. ### DKIM Record Set up DKIM signing for email authentication and improved deliverability. ### Return Path Configure the return path for handling bounces and delivery notifications. ## Common Operations ### Creating a Mail Server When creating a mail server, specify: * **domain**: Your email domain * **mode**: DEV (development) or LIVE (production) * **plan**: The plan based on your email volume needs ### Sending an Email To send an email through the API: ```json theme={null} { "from": "sender@yourdomain.com", "to": "recipient@example.com", "subject": "Email Subject", "text": "Plain text content", "html": "HTML content", "attachments": [] } ``` ### Managing SMTP Credentials 1. Generate credentials for SMTP authentication 2. Use the provided username and password in your SMTP client 3. Connect to the SMTP server on the provided port 4. Revoke credentials when no longer needed ## Plans and Limits Mail servers are available in different plans with varying: * Daily email sending limits * Monthly email volume * Number of email accounts * Storage capacity ## Getting Started 1. Create a mail server for your domain 2. Configure DNS records (MX, SPF, DKIM) 3. Verify DNS configuration through the API 4. Create email accounts as needed 5. Generate SMTP credentials or use the API to send emails ## Best Practices * Always configure SPF, DKIM, and DMARC for better deliverability * Use meaningful tags to categorize outgoing emails * Monitor delivery events to identify issues * Set up inbound rules to block spam sources * Use development mode for testing before going live * Regularly review and clean up unused accounts Explore the API endpoints below to integrate email functionality into your applications. # Object Storage API Source: https://developers.liara.ir/pages/object-storage Scalable object storage solution for storing and managing data # Object Storage API Liara's Object Storage API provides a scalable, reliable, and cost-effective solution for storing and retrieving any amount of data. Built on industry-standard protocols, it's compatible with S3-compatible tools and SDKs. ## Overview The Object Storage API enables you to: * **Create and manage buckets** - Organize your data into buckets with configurable access policies * **Upload and download objects** - Store and retrieve files of any size * **Manage access keys** - Create and manage credentials for programmatic access * **Organize with folders** - Structure your data with a hierarchical folder system * **Monitor usage** - Track storage metrics and object counts * **Migrate data** - Move data between buckets easily ## Key Concepts ### Buckets Buckets are the primary containers for storing objects. Each bucket: * Has a unique name within your account * Can be configured as public or private * Has an associated storage plan that determines capacity * Contains objects organized in a flat structure with prefix-based organization ### Objects Objects are the files stored in buckets. Each object: * Has a unique key (path) within the bucket * Can be any file type or size * Supports metadata for additional information * Can be accessed via presigned URLs for secure temporary access ### Access Keys Access keys provide programmatic access to your buckets: * **Access Key**: Similar to a username, identifies the key * **Secret Key**: Similar to a password, authenticates requests * Keys can be scoped to specific buckets with defined permissions ## Key Features ### S3-Compatible API Liara Object Storage is compatible with the S3 API, allowing you to use existing tools and SDKs: * AWS SDK for various programming languages * S3 CLI tools * Third-party applications with S3 support ### Access Control * **Private Buckets**: Access restricted to authenticated users * **Public Buckets**: Objects accessible via public URLs * **Presigned URLs**: Temporary access to private objects ### Storage Plans Choose from various storage plans based on your capacity needs: * 20GB, 40GB, 80GB, 160GB options * Upgrade plans as your storage needs grow ### Migration Support Easily migrate data between buckets, including from other storage services. ## Base URL ``` https://storage-service.iran.liara.ir ``` ## Common Operations ### Creating a Bucket When creating a bucket, specify: * **name**: A unique bucket name * **plan**: The storage capacity plan * **permission**: Access policy (private or public) ### Uploading Objects 1. Request a presigned upload URL 2. Upload the file using the provided URL 3. The object becomes available in your bucket ### Downloading Objects 1. Request a presigned download URL with optional expiration 2. Download the file using the provided URL ### Managing Keys Create access keys scoped to specific buckets for applications that need programmatic access to your storage. ## Getting Started 1. Create a bucket with your desired plan and access policy 2. Generate access keys for your application 3. Use the API or S3-compatible tools to upload and manage objects 4. Configure access permissions as needed ## Best Practices * Use presigned URLs for secure temporary access * Organize objects with meaningful prefixes * Regularly review and rotate access keys * Monitor storage metrics to optimize costs * Use appropriate access policies for your use case Explore the API endpoints below to integrate object storage into your applications. # PaaS API Source: https://developers.liara.ir/pages/paas Platform as a Service API for deploying and managing applications # PaaS API Liara's Platform as a Service (PaaS) API enables you to deploy, manage, and scale your applications without worrying about the underlying infrastructure. This comprehensive API provides full control over your applications' lifecycle. ## Overview The PaaS API allows you to: * **Create and manage applications** - Deploy new applications with your preferred platform and configuration * **Scale applications** - Adjust the number of instances running your application * **Manage deployments** - Deploy source code or Docker images with zero-downtime options * **Configure environment variables** - Securely manage your application's environment configuration * **Monitor performance** - Access CPU, memory, and network metrics * **Manage domains** - Configure custom domains with SSL certificates * **Handle disks** - Create and manage persistent storage for your applications ## Key Features ### Application Management Create applications with various platforms including Node.js, Python, Go, PHP, Ruby, .NET, and more. Each application can be configured with custom environment variables and resource plans. ### Deployment Options * **Source Code Deployment**: Upload your source code as a compressed archive * **Docker Deployment**: Deploy using Docker images from registries * **Zero-Downtime Deployment**: Enable seamless updates without service interruption ### Scaling Scale your applications up or down based on demand. Turn instances on or off programmatically to optimize resource usage and costs. ### Persistent Storage Attach disks to your applications for persistent data storage. Create backups and manage disk sizes through the API. ### Custom Domains Associate custom domains with your applications and provision SSL certificates automatically. ## Base URL ``` https://api.iran.liara.ir ``` ## WebSocket Support Connect to your application's console in real-time using WebSocket: ``` wss://api.iran.liara.ir?token=&cmd=/bin/bash&project_id= ``` ## Common Use Cases 1. **CI/CD Integration**: Automate deployments from your CI/CD pipeline 2. **Auto-scaling**: Implement custom scaling logic based on metrics 3. **Multi-environment Management**: Manage development, staging, and production environments 4. **Backup Automation**: Schedule and automate disk backups ## Getting Started To start using the PaaS API, you'll need to: 1. Obtain an API token from the Liara Console 2. Create an application with your desired configuration 3. Deploy your code or Docker image 4. Configure domains and environment variables as needed Explore the API endpoints below to learn more about each operation. # Change plan Source: https://developers.liara.ir/pass/apps/change-plan /spec/paas.yaml post /v1/projects/{name}/resize create app that user owns # Create a app Source: https://developers.liara.ir/pass/apps/create-a-app /spec/paas.yaml post /v1/projects create app that user owns # Delete a app Source: https://developers.liara.ir/pass/apps/delete-a-app /spec/paas.yaml delete /v1/projects/{name} delete app that user owns # Get applets of app Source: https://developers.liara.ir/pass/apps/get-applets-of-app /spec/paas.yaml get /v1/projects/{name}/applets get applets of app that user owns # Get details of a project Source: https://developers.liara.ir/pass/apps/get-details-of-a-project /spec/paas.yaml get /v1/projects/{name} get all details of all project that user owns # Get details of all projects Source: https://developers.liara.ir/pass/apps/get-details-of-all-projects /spec/paas.yaml get /v1/projects get all details of all projects that user owns # Get events of the app Source: https://developers.liara.ir/pass/apps/get-events-of-the-app /spec/paas.yaml get /v1/projects/{name}/events get events of the app owned by user # Get logs of app Source: https://developers.liara.ir/pass/apps/get-logs-of-app /spec/paas.yaml get /v1/projects/{name}/logs get logs of app that user owns # Get releases of app Source: https://developers.liara.ir/pass/apps/get-releases-of-app /spec/paas.yaml get /v1/projects/{name}/releases get releases of app that user owns # To restart a app Source: https://developers.liara.ir/pass/apps/to-restart-a-app /spec/paas.yaml post /v1/projects/{name}/actions/restart to restart app that user owns # Turn on or off a app Source: https://developers.liara.ir/pass/apps/turn-on-or-off-a-app /spec/paas.yaml post /v1/projects/{name}/actions/scale turn on or off a app that user owns # Deploy releases Source: https://developers.liara.ir/pass/deploy/deploy-releases /spec/paas.yaml post /v2/projects/{name}/releases deploy releases that user owns # Deploy sources code Source: https://developers.liara.ir/pass/deploy/deploy-sources-code /spec/paas.yaml post /v2/projects/{name}/sources deploy sources code that user owns # Create a disk Source: https://developers.liara.ir/pass/disks/create-a-disk /spec/paas.yaml post /v1/projects/{name}/disks create a disk that user owns # Create backup disk Source: https://developers.liara.ir/pass/disks/create-backup-disk /spec/paas.yaml post /v1/projects/{id}/disks/{name}/backups create backup disk that user owns # Create ftp Source: https://developers.liara.ir/pass/disks/create-ftp /spec/paas.yaml post /v1/projects/{name}/disks/{dname}/ftp create ftp that user owns # Delete a disk Source: https://developers.liara.ir/pass/disks/delete-a-disk /spec/paas.yaml delete /v1/projects/{id}/disks/{name} delete a disk that user owns # Delete a ftp Source: https://developers.liara.ir/pass/disks/delete-a-ftp /spec/paas.yaml delete /v1/ftp/{fname} delete a ftp that user owns # Download backup disk Source: https://developers.liara.ir/pass/disks/download-backup-disk /spec/paas.yaml post /v1/projects/{id}/disks/{dname}/backups/{bname}/download download backup disk that user owns # Get backups disk Source: https://developers.liara.ir/pass/disks/get-backups-disk /spec/paas.yaml get /v1/projects/{id}/disks/{name}/backups get backups disk that user owns # Get disks Source: https://developers.liara.ir/pass/disks/get-disks /spec/paas.yaml get /v1/projects/{id}/disks get disks that user owns # Get ftps Source: https://developers.liara.ir/pass/disks/get-ftps /spec/paas.yaml get /v1/projects/{name}/disks/{dname}/ftp get ftps that user owns # Resize disk Source: https://developers.liara.ir/pass/disks/resize-disk /spec/paas.yaml post /v1/projects/{name}/disks/{dname}/resize resize disk that user owns # Check a domain Source: https://developers.liara.ir/pass/domains/check-a-domain /spec/paas.yaml get /v1/domains/{id}/check check a domain that user owns # Create a domain Source: https://developers.liara.ir/pass/domains/create-a-domain /spec/paas.yaml post /v1/domains create a domain that user owns # Delete a domain Source: https://developers.liara.ir/pass/domains/delete-a-domain /spec/paas.yaml delete /v1/domains/{id} delete a domain that user owns # Disable ssl Source: https://developers.liara.ir/pass/domains/disable-ssl /spec/paas.yaml post /v1/domains/{id}/ssl/disable disable ssl that user owns # Enable ssl Source: https://developers.liara.ir/pass/domains/enable-ssl /spec/paas.yaml post /v1/domains/provision-ssl-certs enable ssl that user owns # Get all domains Source: https://developers.liara.ir/pass/domains/get-all-domains /spec/paas.yaml get /v1/domains get all domains that user owns # Redirect a domain Source: https://developers.liara.ir/pass/domains/redirect-a-domain /spec/paas.yaml post /v1/domains/{id}/set-redirect redirect a domain that user owns # Set a domain for project Source: https://developers.liara.ir/pass/domains/set-a-domain-for-project /spec/paas.yaml post /v1/domains/set-project set a domain for project that user owns # Get cpu reports of app Source: https://developers.liara.ir/pass/reports/get-cpu-reports-of-app /spec/paas.yaml get /v1/projects/{name}/metrics/cpu get cpu reports of app that user owns # Get memory reports of app Source: https://developers.liara.ir/pass/reports/get-memory-reports-of-app /spec/paas.yaml get /v1/projects/{name}/metrics/memory get memory reports of app that user owns # Get network-receive reports of app Source: https://developers.liara.ir/pass/reports/get-network-receive-reports-of-app /spec/paas.yaml get /v1/projects/{name}/metrics/network-receive get network-receive reports of app that user owns # Get network-transmit reports of app Source: https://developers.liara.ir/pass/reports/get-network-transmit-reports-of-app /spec/paas.yaml get /v1/projects/{name}/metrics/network-transmit get network-transmit reports of app that user owns # Get summary reports of app Source: https://developers.liara.ir/pass/reports/get-summary-reports-of-app /spec/paas.yaml get /v1/projects/{name}/metrics/summary get summary reports of app that user owns # Default subdomain Source: https://developers.liara.ir/pass/settings/default-subdomain /spec/paas.yaml post /v1/projects/{id}/default-subdomain/{status} default subdomain that user owns # IP static Source: https://developers.liara.ir/pass/settings/ip-static /spec/paas.yaml post /v1/projects/{id}/fixed-ip/{status} ip static that user owns # Read only Source: https://developers.liara.ir/pass/settings/read-only /spec/paas.yaml post /v1/projects/{id}/read-only/{status} read only that user owns # Update envs Source: https://developers.liara.ir/pass/settings/update-envs /spec/paas.yaml post /v1/projects/update-envs update envs that user owns # Zero downtime Source: https://developers.liara.ir/pass/settings/zero-downtime /spec/paas.yaml post /v1/projects/{id}/zero-downtime/{status} zero downtime that user owns