# Attachment Usages

For a non-exhaustive list of pre-made identifiers for creating statement attachments,  see the [AttachmentUsages](https://github.com/xapijs/xapi/blob/master/src/constants/AttachmentUsages.ts) enum. AttachmentUsages are a static property of the `XAPI` Object.

```typescript
import XAPI, { Attachment } from "@xapi/xapi";

const attachment: Attachment = {
    usageType: XAPI.AttachmentUsages.SUPPORTING_MEDIA,
    display: {
        "en-US": "Image Attachment"
    },
    description: {
        "en-US": "An image of something"
    },
    contentType: "image/jpeg",
    length: imageArrayBufferByteLength,
    sha2: imageArrayBufferSHA2
};
```


---

# 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://www.xapijs.dev/xapi-wrapper-library/attachment-usages.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.
