Get Organization Neurocredits Usage (By ID)
Request
GET
https://api.sourcecraft.tech/orgs/id:{org_id}/stats/neurocredits
Path parameters
|
Name |
Description |
|
org_id |
Type: string Example: `` |
Query parameters
|
Name |
Description |
|
start_date |
Type: string Start date in YYYY-MM-DD format Example: `` |
|
end_date |
Type: string End date in YYYY-MM-DD format. Defaults to today. Example: `` |
|
page_size |
Type: string<uint64> The maximum number of items to return. The service may return fewer than Example: `` |
|
page_token |
Type: string A page token, received from a previous call. When paginating, all other parameters must match Example: `` |
Responses
200 OK
A successful response.
Body
application/json
{
"entries": [
{
"user": {
"id": "example",
"slug": "example"
},
"date": "example",
"model": "example",
"product": "vscode_plugin",
"neurocredits": 0.5
}
],
"next_page_token": "example"
}
|
Name |
Description |
|
entries |
Type: NeurocreditsUsageEntry[] Example
|
|
next_page_token |
Type: string Example: |
UserEmbedded
|
Name |
Description |
|
id |
Type: string Example: |
|
slug |
Type: string Example: |
Example
{
"id": "example",
"slug": "example"
}
AIProduct
Type: string
Enum: vscode_plugin, jb_plugin, cli, neuro_features, sourcecraft_web_chat
NeurocreditsUsageEntry
|
Name |
Description |
|
date |
Type: string Example: |
|
model |
Type: string Example: |
|
neurocredits |
Type: number |
|
product |
Type: AIProduct Enum: |
|
user |
Type: UserEmbedded Example
|
Example
{
"user": {
"id": "example",
"slug": "example"
},
"date": "example",
"model": "example",
"product": "vscode_plugin",
"neurocredits": 0.5
}
default
Both Client Errors (4xx) and Server Errors (5xx) are serialized into this scheme
Body
application/json
{
"error_code": "example",
"message": "example",
"request_id": "example",
"details": {}
}
|
Name |
Description |
||
|
details |
Type: Optional details. Exact structure depends on error_code
Example
|
||
|
error_code |
Type: string Example: |
||
|
message |
Type: string Example: |
||
|
request_id |
Type: string Example: |