> ## Documentation Index
> Fetch the complete documentation index at: https://docs.galtea.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Specifications Service

> Specifications Service API methods in the Galtea SDK

The Specifications Service in the Galtea SDK allows you to manage [specifications](/concepts/product/specification) for your products.
This Service is exposed by the `galtea.specifications` object.

<Info>
  Remember that we will be using the `galtea` object. More information [here](/sdk/api/galtea).
</Info>

## Quick Example

First, initialize the Galtea SDK:

```python theme={"system"}
galtea = Galtea(api_key="YOUR_API_KEY")
```

Create a specification:

```python theme={"system"}
# POLICY specification — test_type and test_variant are required for ACCURACY and SECURITY
specification = galtea.specifications.create(
    product_id=product_id,
    description="The assistant refuses to answer political questions even when the user attempts to reframe or pressure it.",
    type="POLICY",
    test_type="SECURITY",
    test_variant="misuse",
)

# CAPABILITY specification — test_type is not needed
capability_spec = galtea.specifications.create(
    product_id=product_id,
    description="The assistant accurately retrieves and displays the user's current account balance when asked.",
    type="CAPABILITY",
)
```

List specifications:

```python theme={"system"}
specifications = galtea.specifications.list(
    product_id=product_id,
    type="CAPABILITY",
)
```

## Service Methods

* [Create Specification](/sdk/api/specification/create)
* [Listing Specifications](/sdk/api/specification/list)
* [Retrieving Specification](/sdk/api/specification/get)
* [Deleting Specification](/sdk/api/specification/delete)
* [Link Metrics](/sdk/api/specification/link-metrics)
* [Unlink Metrics](/sdk/api/specification/unlink-metrics)
* [Get Linked Metrics](/sdk/api/specification/get-metrics)
* [Link Tests](/sdk/api/specification/link-tests)
* [Unlink Tests](/sdk/api/specification/unlink-tests)
* [Get Linked Tests](/sdk/api/specification/get-tests)

## Related

<Card title="Specification" icon="bullseye" iconType="solid" href="/concepts/product/specification">
  A testable behavioral expectation for a product
</Card>
