# Get Spaces

## **Explanation**

Before submitting any order, use this API to check the available spaces. The `space_name` field may be mandatory for specific services; if required, set `space_name` based on the uploaded image.

***

<mark style="color:green;">**`GET`**</mark> **`https://api.aihomedesign.com/v1/catalog/spaces`**

***

**Query Parameters:**

* `active` (boolean): Set to `true` to retrieve only active widgets.
* `service_name` (string): Set your desired service name e.g., `service-ai-creative-designer`.

## Response

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

```json
{
    "data": [
        {
            "id": string,
            "name": string,
            "title": string,
            "description": string,
            "prompt": string,
            "icon_src": string,
            "is_active": boolean,
            "is_premium": boolean
        }
    ]
}
```

{% endtab %}

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

```json
{
    "error": string,
    "key": string
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://doc.aihomedesign.com/api-endpoints/get-spaces.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
