Skip to main content
GET
/
v1
/
workspaces
/
{workspaceID}
/
logs
List logs
curl --request GET \
  --url https://ai.liara.ir/v1/workspaces/{workspaceID}/logs \
  --header 'Authorization: <api-key>'
{
  "logs": [
    {
      "_id": "<string>",
      "content": {
        "model": "<string>",
        "key": "<string>",
        "details": {
          "tokens_prompt": 123,
          "tokens_completion": 123,
          "total_cost_toman": 123
        }
      },
      "workspace": "<string>",
      "method": "<string>",
      "url": "<string>",
      "createdAt": "2023-11-07T05:31:56Z"
    }
  ],
  "count": 123
}

Authorizations

Authorization
string
header
required

Enter the token with the Bearer: prefix, e.g. "Bearer abcde12345"

Path Parameters

workspaceID
string
required

The workspace ID

Pattern: ^[a-f0-9]{24}$

Query Parameters

from
string<date>

Start date (default: 1 day ago, constrained by plan log retention)

to
string<date>

End date (default: now)

model
string

Filter by model ID

url
enum<string>
default:/chat/completions

Filter by route

Available options:
/chat/completions,
/embeddings,
/image/generations,
/image/edits
page
integer
default:1

Page number

Required range: x >= 1
count
integer
default:15

Items per page

Required range: x >= 1
key
string

Filter by API key name

Required string length: 3 - 15

Response

Paginated list of logs

logs
object[]
count
integer

Total number of matching logs