POST
/
v1
/
views
Create a new view
curl --request POST \
  --url https://api.lunary.ai/v1/views \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "New LLM View",
  "data": [
    "AND",
    {
      "id": "models",
      "params": {
        "models": [
          "gpt-4"
        ]
      }
    }
  ],
  "icon": "chart",
  "type": "llm"
}'
{
  "id": "5678efgh",
  "name": "New LLM View",
  "data": [
    "AND",
    {
      "id": "models",
      "params": {
        "models": [
          "gpt-4"
        ]
      }
    }
  ],
  "columns": [],
  "icon": "chart",
  "type": "llm",
  "projectId": "project123",
  "ownerId": "user456",
  "updatedAt": "2023-04-01T14:30:00Z"
}

Body

application/json
name
string
required
Example:

"New LLM View"

data
array
required
Example:
[
"AND",
{
"id": "models",
"params": { "models": ["gpt-4"] }
}
]
type
enum<string>
required
Available options:
llm,
thread,
trace
Example:

"llm"

columns
object
Example:
{
"id": "ID",
"content": "Content",
"date": "Date"
}
icon
string
Example:

"chart"

Response

200 - application/json

Successful response

id
string
Example:

"1234abcd"

name
string
Example:

"LLM Conversations"

data
array
Example:
[
"AND",
{
"id": "models",
"params": { "models": ["gpt-4"] }
}
]
columns
object
icon
string
Example:

"chat"

type
enum<string>
Available options:
llm,
thread,
trace
Example:

"llm"

projectId
string
Example:

"project123"

ownerId
string
Example:

"user456"

updatedAt
string<date-time>
Example:

"2023-04-01T12:00:00Z"