# Elements

`GET /v1/elements` — Your reusable references: places, props and styles.

- Base URL: https://eroq.ai/v1
- Auth: `Authorization: Bearer eroq_sk_…` (create keys at https://eroq.ai/dashboard/keys)
- Credits: Free

Elements are reusable prompt references (up to 50 per account): a place, a prop or a visual style with a description the prompt-engineering layer folds into any render, and an optional reference photo that joins the engine references. Characters are referenced as `char:<id>` in `elements` arrays — they live on their own endpoints in the studio.

`POST /v1/elements` creates one (`kind` location|object|style, `name`, `description`, optional `imageUrl`); `DELETE /v1/elements/{id}` removes it. Pass their ids in the `elements` array of chat, image and video generations.

## Example request

```bash
curl https://eroq.ai/v1/elements \
  -H "Authorization: Bearer $EROQ_API_KEY"
```

```javascript
const res = await fetch('https://eroq.ai/v1/elements', {
  headers: { Authorization: `Bearer ${process.env.EROQ_API_KEY}` },
})
console.log(await res.json())
```

```python
import os, requests

res = requests.get("https://eroq.ai/v1/elements", headers={"Authorization": f"Bearer {os.environ['EROQ_API_KEY']}"})
print(res.json())
```

```go
package main

import (
	"fmt"
	"io"
	"net/http"
	"os"
)

func main() {
	req, _ := http.NewRequest("GET", "https://eroq.ai/v1/elements", nil)
	req.Header.Set("Authorization", "Bearer "+os.Getenv("EROQ_API_KEY"))

	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	out, _ := io.ReadAll(res.Body)
	fmt.Println(string(out))
}
```

## Response


```json
{
  "elements": [{
    "id": "0b6c…", "kind": "location", "name": "Rooftop bar",
    "description": "rooftop cocktail bar at dusk, string lights", "imageUrl": ""
  }]
}
```
---
Canonical: https://eroq.ai/docs/elements · Index for agents: https://eroq.ai/llms.txt · OpenAPI: https://eroq.ai/openapi.json
