> For the complete documentation index, see [llms.txt](https://docs.altum.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.altum.ai/english/property-valuation-and-market/condition-score-api/authentication-input-and-response.md).

# Authentication, input and response

## Fetch the condition score

## Post url to retrieve the condition score of bathrooms & kitchens.

<mark style="color:green;">`POST`</mark> `https://api.altum.ai/condition-score/url`

#### Headers

| Name                                        | Type   | Description                                                                                          |
| ------------------------------------------- | ------ | ---------------------------------------------------------------------------------------------------- |
| x-api-key<mark style="color:red;">\*</mark> | string | Unique API Key from Altum. Create one on [https://platform.altum.ai](https://platform.altum.ai/auth) |
| Content-Type                                | string | application/json                                                                                     |

#### Request Body

| Name                                  | Type   | Description                                                 |
| ------------------------------------- | ------ | ----------------------------------------------------------- |
| url<mark style="color:red;">\*</mark> | string | The public URL of the image you wish to send int he request |

{% tabs %}
{% tab title="200: OK Successful response" %}

```
{
	"Output": {
		"label": "bathroom",
		"confidence": "98.17",
		"condition_score": "4.09"
	}
}
```

{% endtab %}

{% tab title="400: Bad Request Unsuccessful response" %}

```
{
  "detail": "The URL is not valid"
}
```

{% endtab %}

{% tab title="422: Unprocessable Entity Wrong input format" %}

```
{
	"detail": [
		{
			"loc": [
				"body",
				"image"
			],
			"msg": "field required",
			"type": "value_error.missing"
		}
	]
}
```

{% endtab %}

{% tab title="401: Unauthorized No access" %}

```
{
    'Output': 'Please use https://api.altum.ai or visit https://platform.altum.ai to make your request.'
}
```

{% endtab %}

{% tab title="500: Internal Server Error Service is not available and/or down" %}

```
{
	"message": "Internal server error"
}
```

{% endtab %}

{% tab title="403: Forbidden Forbidden" %}

```
{
	"message": "Missing Authentication Token"
}
```

{% endtab %}
{% endtabs %}

## Upload image file to retrieve the condition score of bathrooms & kitchens.

<mark style="color:green;">`POST`</mark> `https://api.altum.ai/condition-score/img`

#### Headers

| Name                                        | Type   | Description                                                                                   |
| ------------------------------------------- | ------ | --------------------------------------------------------------------------------------------- |
| x-api-key<mark style="color:red;">\*</mark> | string | API Key from Altum. Create one on [https://platform.altum.ai](https://platform.altum.ai/auth) |
| Content-Type                                | string | multipath/form-data                                                                           |

#### Request Body

| Name                                    | Type   | Description                                                                         |
| --------------------------------------- | ------ | ----------------------------------------------------------------------------------- |
| image<mark style="color:red;">\*</mark> | object | The image to be sent in the request must be uploaded as a multipath/form-data type. |

{% tabs %}
{% tab title="200: OK Successful response" %}

```
{
	"Output": {
		"label": "bathroom",
		"confidence": "98.17",
		"condition_score": "4.09"
	}
}
```

{% endtab %}

{% tab title="400: Bad Request Unsuccessful response" %}

```
{
  "detail": "Please upload an image with one of the following formats: .jpg, .jpeg or .png"
}
```

{% endtab %}

{% tab title="422: Unprocessable Entity Wrong input format" %}

```
{
	"detail": [
		{
			"loc": [
				"body",
				"image"
			],
			"msg": "field required",
			"type": "value_error.missing"
		}
	]
}
```

{% endtab %}

{% tab title="401: Unauthorized No access" %}

```
{
    'Output': 'Please use https://api.altum.ai or visit https://platform.altum.ai to make your request.'
}
```

{% endtab %}

{% tab title="500: Internal Server Error Service is not available and/or down" %}

```
{
	"message": "Internal server error"
}
```

{% endtab %}

{% tab title="403: Forbidden Forbidden" %}

```
{
	"message": "Missing Authentication Token"
}
```

{% endtab %}
{% endtabs %}

## FREE Ping for availability

## Post url to confirm if the image contains a kitchen or a bathroom.

<mark style="color:green;">`POST`</mark> `https://api.altum.ai/condition-score/url/ping`

This endpoint enables you to verify whether an image features a bathroom or kitchen before requesting their condition scores. This preliminary check is necessary given that the Condition Score API cannot generate scores if the image does not depict a kitchen or a bathroom.

#### Headers

| Name                                        | Type   | Description                                                                                   |
| ------------------------------------------- | ------ | --------------------------------------------------------------------------------------------- |
| x-api-key<mark style="color:red;">\*</mark> | string | API Key from Altum. Create one on [https://platform.altum.ai](https://platform.altum.ai/auth) |
| Content-Type                                | string | application/json                                                                              |

#### Request Body

| Name                                  | Type   | Description                                                 |
| ------------------------------------- | ------ | ----------------------------------------------------------- |
| url<mark style="color:red;">\*</mark> | string | The public URL of the image you wish to send int he request |

{% tabs %}
{% tab title="200: OK Successful response" %}

```
{
    "Output": {
    "label": "Bathroom or Kitchen image detected",
    "confidence": "98.17"
    }        
}
```

{% endtab %}

{% tab title="400: Bad Request Unsuccessful response" %}

```
{
  "detail": "The URL is not valid"
}
```

{% endtab %}

{% tab title="422: Unprocessable Entity Wrong input format" %}

```
{
	"detail": [
		{
			"loc": [
				"body",
				"image"
			],
			"msg": "field required",
			"type": "value_error.missing"
		}
	]
}
```

{% endtab %}

{% tab title="401: Unauthorized No access" %}

```
{
    'Output': 'Please use https://api.altum.ai or visit https://platform.altum.ai to make your request.'
}
```

{% endtab %}

{% tab title="500: Internal Server Error Service is not available and/or down" %}

```
{
	"message": "Internal server error"
}
```

{% endtab %}

{% tab title="403: Forbidden Forbidden" %}

```
{
	"message": "Missing Authentication Token"
}
```

{% endtab %}
{% endtabs %}

## Upload image file to confirm if the image contains a kitchen or a bathroom.

<mark style="color:green;">`POST`</mark> `https://api.altum.ai/condition-score/img/ping`

This endpoint enables you to verify whether an image features a bathroom or kitchen before requesting their condition scores. This preliminary check is necessary given that the Condition Score API cannot generate scores if the image does not depict a kitchen or a bathroom.

#### Headers

| Name                                        | Type   | Description                                                                                   |
| ------------------------------------------- | ------ | --------------------------------------------------------------------------------------------- |
| x-api-key<mark style="color:red;">\*</mark> | string | API Key from Altum. Create one on [https://platform.altum.ai](https://platform.altum.ai/auth) |
| Content-Type                                | string | multipath/form-data                                                                           |

#### Request Body

| Name                                    | Type   | Description                                                                         |
| --------------------------------------- | ------ | ----------------------------------------------------------------------------------- |
| image<mark style="color:red;">\*</mark> | object | The image to be sent in the request must be uploaded as a multipath/form-data type. |

{% tabs %}
{% tab title="200: OK Successful response" %}

```
{
    "Output": {
    "label": "Bathroom or Kitchen image detected",
    "confidence": "98.17"
    }        
}
```

{% endtab %}

{% tab title="400: Bad Request Unsuccessful response" %}

```
{
  "detail": "Please upload an image with one of the following formats: .jpg, .jpeg or .png"
}
```

{% endtab %}

{% tab title="422: Unprocessable Entity Wrong input format" %}

```
{
	"detail": [
		{
			"loc": [
				"body",
				"image"
			],
			"msg": "field required",
			"type": "value_error.missing"
		}
	]
}
```

{% endtab %}

{% tab title="401: Unauthorized No access" %}

```
{
    'Output': 'Please use https://api.altum.ai or visit https://platform.altum.ai to make your request.'
}
```

{% endtab %}

{% tab title="500: Internal Server Error Service is not available and/or down" %}

```
{
	"message": "Internal server error"
}
```

{% endtab %}

{% tab title="403: Forbidden Forbidden" %}

```
{
	"message": "Missing Authentication Token"
}
```

{% endtab %}
{% endtabs %}

## Request body

#### Example request

```
{"url":"https://www.rawsonhomes.com.au/-/media/rawson-homes/blogs-external-banner-images/blog-articles/2020-blogs/september-2020/facades/narraweena-nara-facade.ashx"}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.altum.ai/english/property-valuation-and-market/condition-score-api/authentication-input-and-response.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
