> For the complete documentation index, see [llms.txt](https://savv-pro.gitbook.io/welcome/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://savv-pro.gitbook.io/welcome/ai-background-remover-api/status-code.md).

# Status Code

## 200 - Response Successful

**Description:** The request was successful, and the server returned the expected response.\
**Example Use Case:** The background of an image was successfully removed, and the processed image URL is returned.

```
{
  "status": "success",
  "result_url": "https://your-storage-url.com/output-image.png"
}
```

## 400 - Bad Request

**Description:** The server could not understand the request due to invalid syntax or missing required parameters.\
**Example Use Case:** The request body is malformed, or a required field is missing.

```
{
  "status": "Error",
  "message": "Invalid command or missing parameter."
}
```

## 401 - Unauthorized

**Description:** The request requires valid authentication credentials.\
**Example Use Case:** The API key is missing, incorrect, or revoked.

```
{
  "status": "Error",
  "message": "Unauthorized. Please provide a valid API key."
}
```

## 403 - Forbidden

**Description:** The server understands the request, but the client does not have permission to access the resource.\
**Example Use Case:** Attempting to access a restricted resource without sufficient privileges.

```
{
  "status": "Error",
  "message": "Access forbidden. You do not have permission to access this resource."
}
```

## 404 - Not Found

**Description:** The requested resource could not be found.\
**Example Use Case:** The specified endpoint or image resource does not exist.

```
{
  "status": "Error",
  "message": "Resource not found."
}
```

## 500 - Internal Server Error

**Description:** The server encountered an unexpected condition that prevented it from fulfilling the request.\
**Example Use Case:** An unexpected error occurs on the server, such as a failure in the background removal process.

```
{
  "status": "error",
  "message": "Internal server error. Please try again later."
}
```
