Requête de coût
curl --request POST \
--url https://api.example.com/cost/query \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"project_id": "<string>",
"fields": [
"id",
"llm_id",
"prompt_token_cost",
"completion_token_cost",
"prompt_token_cost_unit",
"completion_token_cost_unit",
"effective_date",
"provider_id"
],
"query": {
"$expr": {
"$and": [
{
"$literal": "<string>"
}
]
}
},
"sort_by": [
{
"field": "<string>"
}
],
"limit": 10,
"offset": 0
}
'{
"results": [
{
"id": "2341-asdf-asdf",
"llm_id": "gpt4",
"prompt_token_cost": 1,
"completion_token_cost": 1,
"prompt_token_cost_unit": "USD",
"completion_token_cost_unit": "USD",
"effective_date": "2024-01-01T00:00:00Z",
"provider_id": "openai"
}
]
}Requête de coût
POST
/
cost
/
query
Requête de coût
curl --request POST \
--url https://api.example.com/cost/query \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"project_id": "<string>",
"fields": [
"id",
"llm_id",
"prompt_token_cost",
"completion_token_cost",
"prompt_token_cost_unit",
"completion_token_cost_unit",
"effective_date",
"provider_id"
],
"query": {
"$expr": {
"$and": [
{
"$literal": "<string>"
}
]
}
},
"sort_by": [
{
"field": "<string>"
}
],
"limit": 10,
"offset": 0
}
'{
"results": [
{
"id": "2341-asdf-asdf",
"llm_id": "gpt4",
"prompt_token_cost": 1,
"completion_token_cost": 1,
"prompt_token_cost_unit": "USD",
"completion_token_cost_unit": "USD",
"effective_date": "2024-01-01T00:00:00Z",
"provider_id": "openai"
}
]
}Documentation Index
Fetch the complete documentation index at: https://wb-21fd5541-kb-refresh.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Autorisations
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Corps
application/json
Exemple:
"entity/project"
Exemple:
[
"id",
"llm_id",
"prompt_token_cost",
"completion_token_cost",
"prompt_token_cost_unit",
"completion_token_cost_unit",
"effective_date",
"provider_id"
]Show child attributes
Show child attributes
Show child attributes
Show child attributes
Exemple:
10
Exemple:
0
Réponse
Réponse réussie
Show child attributes
Show child attributes
Cette page vous a-t-elle été utile ?
⌘I