@1claw/openapi-spec 0.61.38 → 0.61.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/openapi.json +944 -1
- package/openapi.yaml +471 -1
- package/package.json +1 -1
package/openapi.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"openapi": "3.1.0",
|
|
3
3
|
"info": {
|
|
4
4
|
"title": "1Claw API",
|
|
5
|
-
"version": "0.61.
|
|
5
|
+
"version": "0.61.40",
|
|
6
6
|
"description": "Secure secret management for AI agents. Provides vaults, secrets,\npolicy-based access control, agent identity, Intents API,\nsharing, billing, and audit logging. Automations (workflow_spec,\nwebhook tokens, event triggers, Assist), cloud runtimes with\ninteractive shell sessions, agent memory, and discovery.\n\n## Domains\n\n`api.1claw.co` is canonical: it is the OIDC issuer, the `aud` the API\nmints, and the first entry in `servers` — a generated client takes its\nbase URL from there, and the previous ordering pointed every SDK at the\ndomain the issuer had already left. `api.1claw.xyz` still answers and is\nstill accepted on token validation, because tokens minted before the\nmove carry it; it is never minted now.\n\nOne deliberate exception: the Shroud attestation identity token is\nrequested from GCP with `audience: https://api.1claw.xyz`, so\n`/v1/shroud/attestation` reports that as its `expected_audience`. That\nis accurate rather than stale — the audience is a verification contract\nwith anyone already checking the token, and moving it is a breaking\nchange for them, not a rename.\n\nAll endpoints require JWT Bearer authentication unless marked with\n`security: []`.\n",
|
|
7
7
|
"contact": {
|
|
8
8
|
"email": "ops@1claw.co"
|
|
@@ -79,6 +79,10 @@
|
|
|
79
79
|
"name": "Organization",
|
|
80
80
|
"description": "Org membership and roles"
|
|
81
81
|
},
|
|
82
|
+
{
|
|
83
|
+
"name": "Spend",
|
|
84
|
+
"description": "AI spend — inference cost per agent, provider and model, against budgets and caps"
|
|
85
|
+
},
|
|
82
86
|
{
|
|
83
87
|
"name": "Billing",
|
|
84
88
|
"description": "Subscriptions, credits, and usage"
|
|
@@ -6610,6 +6614,301 @@
|
|
|
6610
6614
|
}
|
|
6611
6615
|
}
|
|
6612
6616
|
},
|
|
6617
|
+
"/v1/spend/ai": {
|
|
6618
|
+
"get": {
|
|
6619
|
+
"tags": [
|
|
6620
|
+
"Spend"
|
|
6621
|
+
],
|
|
6622
|
+
"summary": "AI spend",
|
|
6623
|
+
"operationId": "getAiSpend",
|
|
6624
|
+
"description": "Inference spend for the org over a window (default the last 30 days):\ntotals with the previous equal-length window for comparison, a time series\nby provider, and breakdowns by provider, by model and by agent — each agent\nwith its `shroud_config` daily budget, today's spend against it and the\nrequests Shroud blocked for budget. `limits` carries router-key spend caps,\nthe credit balance and 1Claw's inspection fees for the window (a separate\nnumber from provider cost). Every request is priced at ingest from the\nprice card (`GET /v1/spend/ai/prices`); a request whose provider has no\ncard is counted as unpriced, not free. Human and platform callers only.\nBacks the dashboard's Spend tab; the same numbers reach an org's own\ncollector as OTEL metrics `ai.cost_usd`, `ai.tokens.input`, `ai.tokens.output`.\n",
|
|
6625
|
+
"parameters": [
|
|
6626
|
+
{
|
|
6627
|
+
"name": "from",
|
|
6628
|
+
"in": "query",
|
|
6629
|
+
"schema": {
|
|
6630
|
+
"type": "string",
|
|
6631
|
+
"format": "date-time"
|
|
6632
|
+
}
|
|
6633
|
+
},
|
|
6634
|
+
{
|
|
6635
|
+
"name": "to",
|
|
6636
|
+
"in": "query",
|
|
6637
|
+
"schema": {
|
|
6638
|
+
"type": "string",
|
|
6639
|
+
"format": "date-time"
|
|
6640
|
+
}
|
|
6641
|
+
},
|
|
6642
|
+
{
|
|
6643
|
+
"name": "interval",
|
|
6644
|
+
"in": "query",
|
|
6645
|
+
"schema": {
|
|
6646
|
+
"type": "string",
|
|
6647
|
+
"enum": [
|
|
6648
|
+
"day",
|
|
6649
|
+
"week",
|
|
6650
|
+
"month"
|
|
6651
|
+
],
|
|
6652
|
+
"default": "day"
|
|
6653
|
+
}
|
|
6654
|
+
},
|
|
6655
|
+
{
|
|
6656
|
+
"name": "agent_id",
|
|
6657
|
+
"in": "query",
|
|
6658
|
+
"schema": {
|
|
6659
|
+
"type": "string",
|
|
6660
|
+
"format": "uuid"
|
|
6661
|
+
}
|
|
6662
|
+
},
|
|
6663
|
+
{
|
|
6664
|
+
"name": "provider",
|
|
6665
|
+
"in": "query",
|
|
6666
|
+
"schema": {
|
|
6667
|
+
"type": "string"
|
|
6668
|
+
}
|
|
6669
|
+
}
|
|
6670
|
+
],
|
|
6671
|
+
"responses": {
|
|
6672
|
+
"200": {
|
|
6673
|
+
"description": "Spend",
|
|
6674
|
+
"content": {
|
|
6675
|
+
"application/json": {
|
|
6676
|
+
"schema": {
|
|
6677
|
+
"$ref": "#/components/schemas/AiSpend"
|
|
6678
|
+
}
|
|
6679
|
+
}
|
|
6680
|
+
}
|
|
6681
|
+
},
|
|
6682
|
+
"400": {
|
|
6683
|
+
"$ref": "#/components/responses/BadRequest"
|
|
6684
|
+
},
|
|
6685
|
+
"401": {
|
|
6686
|
+
"$ref": "#/components/responses/Unauthorized"
|
|
6687
|
+
},
|
|
6688
|
+
"403": {
|
|
6689
|
+
"$ref": "#/components/responses/Forbidden"
|
|
6690
|
+
}
|
|
6691
|
+
}
|
|
6692
|
+
}
|
|
6693
|
+
},
|
|
6694
|
+
"/v1/spend/ai/export.csv": {
|
|
6695
|
+
"get": {
|
|
6696
|
+
"tags": [
|
|
6697
|
+
"Spend"
|
|
6698
|
+
],
|
|
6699
|
+
"summary": "AI spend as CSV",
|
|
6700
|
+
"operationId": "exportAiSpendCsv",
|
|
6701
|
+
"description": "One row per agent × provider × model in the window (same filters as `GET /v1/spend/ai`).",
|
|
6702
|
+
"parameters": [
|
|
6703
|
+
{
|
|
6704
|
+
"name": "from",
|
|
6705
|
+
"in": "query",
|
|
6706
|
+
"schema": {
|
|
6707
|
+
"type": "string",
|
|
6708
|
+
"format": "date-time"
|
|
6709
|
+
}
|
|
6710
|
+
},
|
|
6711
|
+
{
|
|
6712
|
+
"name": "to",
|
|
6713
|
+
"in": "query",
|
|
6714
|
+
"schema": {
|
|
6715
|
+
"type": "string",
|
|
6716
|
+
"format": "date-time"
|
|
6717
|
+
}
|
|
6718
|
+
},
|
|
6719
|
+
{
|
|
6720
|
+
"name": "agent_id",
|
|
6721
|
+
"in": "query",
|
|
6722
|
+
"schema": {
|
|
6723
|
+
"type": "string",
|
|
6724
|
+
"format": "uuid"
|
|
6725
|
+
}
|
|
6726
|
+
},
|
|
6727
|
+
{
|
|
6728
|
+
"name": "provider",
|
|
6729
|
+
"in": "query",
|
|
6730
|
+
"schema": {
|
|
6731
|
+
"type": "string"
|
|
6732
|
+
}
|
|
6733
|
+
}
|
|
6734
|
+
],
|
|
6735
|
+
"responses": {
|
|
6736
|
+
"200": {
|
|
6737
|
+
"description": "CSV",
|
|
6738
|
+
"content": {
|
|
6739
|
+
"text/csv": {
|
|
6740
|
+
"schema": {
|
|
6741
|
+
"type": "string"
|
|
6742
|
+
}
|
|
6743
|
+
}
|
|
6744
|
+
}
|
|
6745
|
+
},
|
|
6746
|
+
"401": {
|
|
6747
|
+
"$ref": "#/components/responses/Unauthorized"
|
|
6748
|
+
},
|
|
6749
|
+
"403": {
|
|
6750
|
+
"$ref": "#/components/responses/Forbidden"
|
|
6751
|
+
}
|
|
6752
|
+
}
|
|
6753
|
+
}
|
|
6754
|
+
},
|
|
6755
|
+
"/v1/spend/ai/prices": {
|
|
6756
|
+
"get": {
|
|
6757
|
+
"tags": [
|
|
6758
|
+
"Spend"
|
|
6759
|
+
],
|
|
6760
|
+
"summary": "LLM price card",
|
|
6761
|
+
"operationId": "listLlmPrices",
|
|
6762
|
+
"description": "The global price card (public list prices per million tokens) plus this\norg's overrides. Matching: an org row beats a global row; among those the\nlongest `model_pattern` wins; a pattern ending in `%` is a prefix match.\n",
|
|
6763
|
+
"responses": {
|
|
6764
|
+
"200": {
|
|
6765
|
+
"description": "Prices",
|
|
6766
|
+
"content": {
|
|
6767
|
+
"application/json": {
|
|
6768
|
+
"schema": {
|
|
6769
|
+
"type": "object",
|
|
6770
|
+
"required": [
|
|
6771
|
+
"prices"
|
|
6772
|
+
],
|
|
6773
|
+
"properties": {
|
|
6774
|
+
"prices": {
|
|
6775
|
+
"type": "array",
|
|
6776
|
+
"items": {
|
|
6777
|
+
"$ref": "#/components/schemas/LlmModelPrice"
|
|
6778
|
+
}
|
|
6779
|
+
}
|
|
6780
|
+
}
|
|
6781
|
+
}
|
|
6782
|
+
}
|
|
6783
|
+
}
|
|
6784
|
+
},
|
|
6785
|
+
"401": {
|
|
6786
|
+
"$ref": "#/components/responses/Unauthorized"
|
|
6787
|
+
}
|
|
6788
|
+
}
|
|
6789
|
+
},
|
|
6790
|
+
"put": {
|
|
6791
|
+
"tags": [
|
|
6792
|
+
"Spend"
|
|
6793
|
+
],
|
|
6794
|
+
"summary": "Set an org price override",
|
|
6795
|
+
"operationId": "upsertLlmPrice",
|
|
6796
|
+
"description": "Owner/admin. Upserts one override for this org; future requests are priced with it (history is not rewritten).",
|
|
6797
|
+
"requestBody": {
|
|
6798
|
+
"required": true,
|
|
6799
|
+
"content": {
|
|
6800
|
+
"application/json": {
|
|
6801
|
+
"schema": {
|
|
6802
|
+
"type": "object",
|
|
6803
|
+
"required": [
|
|
6804
|
+
"provider",
|
|
6805
|
+
"model_pattern",
|
|
6806
|
+
"input_usd_per_mtok",
|
|
6807
|
+
"output_usd_per_mtok"
|
|
6808
|
+
],
|
|
6809
|
+
"properties": {
|
|
6810
|
+
"provider": {
|
|
6811
|
+
"type": "string",
|
|
6812
|
+
"example": "anthropic"
|
|
6813
|
+
},
|
|
6814
|
+
"model_pattern": {
|
|
6815
|
+
"type": "string",
|
|
6816
|
+
"example": "claude-sonnet-5%"
|
|
6817
|
+
},
|
|
6818
|
+
"input_usd_per_mtok": {
|
|
6819
|
+
"type": "number",
|
|
6820
|
+
"example": 3
|
|
6821
|
+
},
|
|
6822
|
+
"output_usd_per_mtok": {
|
|
6823
|
+
"type": "number",
|
|
6824
|
+
"example": 15
|
|
6825
|
+
}
|
|
6826
|
+
}
|
|
6827
|
+
}
|
|
6828
|
+
}
|
|
6829
|
+
}
|
|
6830
|
+
},
|
|
6831
|
+
"responses": {
|
|
6832
|
+
"200": {
|
|
6833
|
+
"description": "The override",
|
|
6834
|
+
"content": {
|
|
6835
|
+
"application/json": {
|
|
6836
|
+
"schema": {
|
|
6837
|
+
"$ref": "#/components/schemas/LlmModelPrice"
|
|
6838
|
+
}
|
|
6839
|
+
}
|
|
6840
|
+
}
|
|
6841
|
+
},
|
|
6842
|
+
"400": {
|
|
6843
|
+
"$ref": "#/components/responses/BadRequest"
|
|
6844
|
+
},
|
|
6845
|
+
"403": {
|
|
6846
|
+
"$ref": "#/components/responses/Forbidden"
|
|
6847
|
+
}
|
|
6848
|
+
}
|
|
6849
|
+
}
|
|
6850
|
+
},
|
|
6851
|
+
"/v1/spend/ai/prices/{id}": {
|
|
6852
|
+
"delete": {
|
|
6853
|
+
"tags": [
|
|
6854
|
+
"Spend"
|
|
6855
|
+
],
|
|
6856
|
+
"summary": "Remove an org price override",
|
|
6857
|
+
"operationId": "deleteLlmPrice",
|
|
6858
|
+
"parameters": [
|
|
6859
|
+
{
|
|
6860
|
+
"name": "id",
|
|
6861
|
+
"in": "path",
|
|
6862
|
+
"required": true,
|
|
6863
|
+
"schema": {
|
|
6864
|
+
"type": "string",
|
|
6865
|
+
"format": "uuid"
|
|
6866
|
+
}
|
|
6867
|
+
}
|
|
6868
|
+
],
|
|
6869
|
+
"responses": {
|
|
6870
|
+
"204": {
|
|
6871
|
+
"description": "Removed"
|
|
6872
|
+
},
|
|
6873
|
+
"403": {
|
|
6874
|
+
"$ref": "#/components/responses/Forbidden"
|
|
6875
|
+
},
|
|
6876
|
+
"404": {
|
|
6877
|
+
"$ref": "#/components/responses/NotFound"
|
|
6878
|
+
}
|
|
6879
|
+
}
|
|
6880
|
+
}
|
|
6881
|
+
},
|
|
6882
|
+
"/v1/spend/ai/reprice": {
|
|
6883
|
+
"post": {
|
|
6884
|
+
"tags": [
|
|
6885
|
+
"Spend"
|
|
6886
|
+
],
|
|
6887
|
+
"summary": "Price the org's unpriced requests",
|
|
6888
|
+
"operationId": "repriceAiSpend",
|
|
6889
|
+
"description": "Owner/admin. Re-runs the price card over rows that had no price when they arrived (after adding a card for that provider). Already-priced rows are untouched.",
|
|
6890
|
+
"responses": {
|
|
6891
|
+
"200": {
|
|
6892
|
+
"description": "Count",
|
|
6893
|
+
"content": {
|
|
6894
|
+
"application/json": {
|
|
6895
|
+
"schema": {
|
|
6896
|
+
"type": "object",
|
|
6897
|
+
"properties": {
|
|
6898
|
+
"repriced": {
|
|
6899
|
+
"type": "integer"
|
|
6900
|
+
}
|
|
6901
|
+
}
|
|
6902
|
+
}
|
|
6903
|
+
}
|
|
6904
|
+
}
|
|
6905
|
+
},
|
|
6906
|
+
"403": {
|
|
6907
|
+
"$ref": "#/components/responses/Forbidden"
|
|
6908
|
+
}
|
|
6909
|
+
}
|
|
6910
|
+
}
|
|
6911
|
+
},
|
|
6613
6912
|
"/v1/org/overview": {
|
|
6614
6913
|
"get": {
|
|
6615
6914
|
"tags": [
|
|
@@ -29653,6 +29952,254 @@
|
|
|
29653
29952
|
}
|
|
29654
29953
|
}
|
|
29655
29954
|
},
|
|
29955
|
+
"/v1/runtimes/provision": {
|
|
29956
|
+
"post": {
|
|
29957
|
+
"tags": [
|
|
29958
|
+
"Runtimes"
|
|
29959
|
+
],
|
|
29960
|
+
"summary": "Provision an agent and its runtime in one call",
|
|
29961
|
+
"operationId": "provisionRuntime",
|
|
29962
|
+
"description": "Creates (or reuses) the agent, its keys and default-vault grant, the runtime, and\nstarts it. Each step runs the same code as the individual endpoints, so the\n`agent.create` consensus gate, plan caps, image allowlist and included-slot logic\napply exactly as one click at a time. Human-only. The new agent's API key is\nreturned once.\n",
|
|
29963
|
+
"requestBody": {
|
|
29964
|
+
"required": true,
|
|
29965
|
+
"content": {
|
|
29966
|
+
"application/json": {
|
|
29967
|
+
"schema": {
|
|
29968
|
+
"type": "object",
|
|
29969
|
+
"required": [
|
|
29970
|
+
"name",
|
|
29971
|
+
"agent"
|
|
29972
|
+
],
|
|
29973
|
+
"properties": {
|
|
29974
|
+
"name": {
|
|
29975
|
+
"type": "string"
|
|
29976
|
+
},
|
|
29977
|
+
"template": {
|
|
29978
|
+
"type": "string"
|
|
29979
|
+
},
|
|
29980
|
+
"preset": {
|
|
29981
|
+
"type": "string",
|
|
29982
|
+
"default": "small"
|
|
29983
|
+
},
|
|
29984
|
+
"agent": {
|
|
29985
|
+
"type": "object",
|
|
29986
|
+
"description": "Either `id` (existing) or `name` (create).",
|
|
29987
|
+
"properties": {
|
|
29988
|
+
"id": {
|
|
29989
|
+
"type": "string",
|
|
29990
|
+
"format": "uuid"
|
|
29991
|
+
},
|
|
29992
|
+
"name": {
|
|
29993
|
+
"type": "string"
|
|
29994
|
+
},
|
|
29995
|
+
"description": {
|
|
29996
|
+
"type": "string"
|
|
29997
|
+
}
|
|
29998
|
+
}
|
|
29999
|
+
},
|
|
30000
|
+
"env_public": {
|
|
30001
|
+
"type": "object",
|
|
30002
|
+
"additionalProperties": {
|
|
30003
|
+
"type": "string"
|
|
30004
|
+
}
|
|
30005
|
+
},
|
|
30006
|
+
"expose_http": {
|
|
30007
|
+
"type": "boolean"
|
|
30008
|
+
},
|
|
30009
|
+
"source_repo": {
|
|
30010
|
+
"type": "string"
|
|
30011
|
+
},
|
|
30012
|
+
"startup_command": {
|
|
30013
|
+
"type": "string"
|
|
30014
|
+
},
|
|
30015
|
+
"environment": {
|
|
30016
|
+
"type": "string"
|
|
30017
|
+
},
|
|
30018
|
+
"start": {
|
|
30019
|
+
"type": "boolean",
|
|
30020
|
+
"default": true
|
|
30021
|
+
},
|
|
30022
|
+
"approval_id": {
|
|
30023
|
+
"type": "string",
|
|
30024
|
+
"format": "uuid"
|
|
30025
|
+
}
|
|
30026
|
+
}
|
|
30027
|
+
}
|
|
30028
|
+
}
|
|
30029
|
+
}
|
|
30030
|
+
},
|
|
30031
|
+
"responses": {
|
|
30032
|
+
"201": {
|
|
30033
|
+
"description": "Provisioned",
|
|
30034
|
+
"content": {
|
|
30035
|
+
"application/json": {
|
|
30036
|
+
"schema": {
|
|
30037
|
+
"type": "object",
|
|
30038
|
+
"required": [
|
|
30039
|
+
"runtime",
|
|
30040
|
+
"agent_id",
|
|
30041
|
+
"started"
|
|
30042
|
+
],
|
|
30043
|
+
"properties": {
|
|
30044
|
+
"runtime": {
|
|
30045
|
+
"$ref": "#/components/schemas/RuntimeResponse"
|
|
30046
|
+
},
|
|
30047
|
+
"agent_id": {
|
|
30048
|
+
"type": "string",
|
|
30049
|
+
"format": "uuid"
|
|
30050
|
+
},
|
|
30051
|
+
"agent_api_key": {
|
|
30052
|
+
"type": "string",
|
|
30053
|
+
"description": "Only when the agent was created here; shown once."
|
|
30054
|
+
},
|
|
30055
|
+
"vault_id": {
|
|
30056
|
+
"type": "string",
|
|
30057
|
+
"format": "uuid"
|
|
30058
|
+
},
|
|
30059
|
+
"started": {
|
|
30060
|
+
"type": "boolean"
|
|
30061
|
+
}
|
|
30062
|
+
}
|
|
30063
|
+
}
|
|
30064
|
+
}
|
|
30065
|
+
}
|
|
30066
|
+
},
|
|
30067
|
+
"400": {
|
|
30068
|
+
"$ref": "#/components/responses/BadRequest"
|
|
30069
|
+
},
|
|
30070
|
+
"401": {
|
|
30071
|
+
"$ref": "#/components/responses/Unauthorized"
|
|
30072
|
+
},
|
|
30073
|
+
"403": {
|
|
30074
|
+
"$ref": "#/components/responses/Forbidden"
|
|
30075
|
+
}
|
|
30076
|
+
}
|
|
30077
|
+
}
|
|
30078
|
+
},
|
|
30079
|
+
"/v1/runtimes/{runtime_id}/env/resolved": {
|
|
30080
|
+
"get": {
|
|
30081
|
+
"tags": [
|
|
30082
|
+
"Runtimes"
|
|
30083
|
+
],
|
|
30084
|
+
"summary": "The environment the container is started with",
|
|
30085
|
+
"operationId": "getRuntimeResolvedEnv",
|
|
30086
|
+
"description": "Every variable, its source (`platform`, `env_public`, `vault_env`, `agent`,\n`secret`) and which wins on a name collision. Vault-derived values and the minted\nagent token are named, never shown. Human-only; nothing is minted.\n",
|
|
30087
|
+
"parameters": [
|
|
30088
|
+
{
|
|
30089
|
+
"name": "runtime_id",
|
|
30090
|
+
"in": "path",
|
|
30091
|
+
"required": true,
|
|
30092
|
+
"schema": {
|
|
30093
|
+
"type": "string",
|
|
30094
|
+
"format": "uuid"
|
|
30095
|
+
}
|
|
30096
|
+
}
|
|
30097
|
+
],
|
|
30098
|
+
"responses": {
|
|
30099
|
+
"200": {
|
|
30100
|
+
"description": "Resolved environment",
|
|
30101
|
+
"content": {
|
|
30102
|
+
"application/json": {
|
|
30103
|
+
"schema": {
|
|
30104
|
+
"type": "object",
|
|
30105
|
+
"properties": {
|
|
30106
|
+
"runtime_id": {
|
|
30107
|
+
"type": "string",
|
|
30108
|
+
"format": "uuid"
|
|
30109
|
+
},
|
|
30110
|
+
"environment": {
|
|
30111
|
+
"type": "string"
|
|
30112
|
+
},
|
|
30113
|
+
"restart_required_for_changes": {
|
|
30114
|
+
"type": "boolean"
|
|
30115
|
+
},
|
|
30116
|
+
"entries": {
|
|
30117
|
+
"type": "array",
|
|
30118
|
+
"items": {
|
|
30119
|
+
"type": "object",
|
|
30120
|
+
"properties": {
|
|
30121
|
+
"key": {
|
|
30122
|
+
"type": "string"
|
|
30123
|
+
},
|
|
30124
|
+
"source": {
|
|
30125
|
+
"type": "string",
|
|
30126
|
+
"enum": [
|
|
30127
|
+
"platform",
|
|
30128
|
+
"env_public",
|
|
30129
|
+
"vault_env",
|
|
30130
|
+
"agent",
|
|
30131
|
+
"secret"
|
|
30132
|
+
]
|
|
30133
|
+
},
|
|
30134
|
+
"value": {
|
|
30135
|
+
"type": "string"
|
|
30136
|
+
},
|
|
30137
|
+
"masked": {
|
|
30138
|
+
"type": "boolean"
|
|
30139
|
+
},
|
|
30140
|
+
"overrides": {
|
|
30141
|
+
"type": "string",
|
|
30142
|
+
"nullable": true
|
|
30143
|
+
}
|
|
30144
|
+
}
|
|
30145
|
+
}
|
|
30146
|
+
}
|
|
30147
|
+
}
|
|
30148
|
+
}
|
|
30149
|
+
}
|
|
30150
|
+
}
|
|
30151
|
+
},
|
|
30152
|
+
"401": {
|
|
30153
|
+
"$ref": "#/components/responses/Unauthorized"
|
|
30154
|
+
},
|
|
30155
|
+
"404": {
|
|
30156
|
+
"$ref": "#/components/responses/NotFound"
|
|
30157
|
+
}
|
|
30158
|
+
}
|
|
30159
|
+
}
|
|
30160
|
+
},
|
|
30161
|
+
"/v1/runtimes/{runtime_id}/rollback": {
|
|
30162
|
+
"post": {
|
|
30163
|
+
"tags": [
|
|
30164
|
+
"Runtimes"
|
|
30165
|
+
],
|
|
30166
|
+
"summary": "Roll back to the previous image and restart",
|
|
30167
|
+
"operationId": "rollbackRuntime",
|
|
30168
|
+
"description": "Starts the runtime again on `previous_image_digest` (recorded at each start whose\nresolved image differed). The image must still pass the allowlist. 409 when no\nprevious image is recorded.\n",
|
|
30169
|
+
"parameters": [
|
|
30170
|
+
{
|
|
30171
|
+
"name": "runtime_id",
|
|
30172
|
+
"in": "path",
|
|
30173
|
+
"required": true,
|
|
30174
|
+
"schema": {
|
|
30175
|
+
"type": "string",
|
|
30176
|
+
"format": "uuid"
|
|
30177
|
+
}
|
|
30178
|
+
}
|
|
30179
|
+
],
|
|
30180
|
+
"responses": {
|
|
30181
|
+
"200": {
|
|
30182
|
+
"description": "Restarting on the previous image",
|
|
30183
|
+
"content": {
|
|
30184
|
+
"application/json": {
|
|
30185
|
+
"schema": {
|
|
30186
|
+
"$ref": "#/components/schemas/RuntimeResponse"
|
|
30187
|
+
}
|
|
30188
|
+
}
|
|
30189
|
+
}
|
|
30190
|
+
},
|
|
30191
|
+
"401": {
|
|
30192
|
+
"$ref": "#/components/responses/Unauthorized"
|
|
30193
|
+
},
|
|
30194
|
+
"404": {
|
|
30195
|
+
"$ref": "#/components/responses/NotFound"
|
|
30196
|
+
},
|
|
30197
|
+
"409": {
|
|
30198
|
+
"$ref": "#/components/responses/Conflict"
|
|
30199
|
+
}
|
|
30200
|
+
}
|
|
30201
|
+
}
|
|
30202
|
+
},
|
|
29656
30203
|
"/v1/runtimes/{runtime_id}/rebuild": {
|
|
29657
30204
|
"parameters": [
|
|
29658
30205
|
{
|
|
@@ -43393,6 +43940,398 @@
|
|
|
43393
43940
|
}
|
|
43394
43941
|
}
|
|
43395
43942
|
},
|
|
43943
|
+
"LlmModelPrice": {
|
|
43944
|
+
"type": "object",
|
|
43945
|
+
"required": [
|
|
43946
|
+
"id",
|
|
43947
|
+
"provider",
|
|
43948
|
+
"model_pattern",
|
|
43949
|
+
"input_micro_usd_per_mtok",
|
|
43950
|
+
"output_micro_usd_per_mtok",
|
|
43951
|
+
"source",
|
|
43952
|
+
"updated_at"
|
|
43953
|
+
],
|
|
43954
|
+
"properties": {
|
|
43955
|
+
"id": {
|
|
43956
|
+
"type": "string",
|
|
43957
|
+
"format": "uuid"
|
|
43958
|
+
},
|
|
43959
|
+
"org_id": {
|
|
43960
|
+
"type": "string",
|
|
43961
|
+
"format": "uuid",
|
|
43962
|
+
"nullable": true,
|
|
43963
|
+
"description": "Null for a global row."
|
|
43964
|
+
},
|
|
43965
|
+
"provider": {
|
|
43966
|
+
"type": "string"
|
|
43967
|
+
},
|
|
43968
|
+
"model_pattern": {
|
|
43969
|
+
"type": "string"
|
|
43970
|
+
},
|
|
43971
|
+
"input_micro_usd_per_mtok": {
|
|
43972
|
+
"type": "integer",
|
|
43973
|
+
"format": "int64"
|
|
43974
|
+
},
|
|
43975
|
+
"output_micro_usd_per_mtok": {
|
|
43976
|
+
"type": "integer",
|
|
43977
|
+
"format": "int64"
|
|
43978
|
+
},
|
|
43979
|
+
"source": {
|
|
43980
|
+
"type": "string"
|
|
43981
|
+
},
|
|
43982
|
+
"updated_at": {
|
|
43983
|
+
"type": "string",
|
|
43984
|
+
"format": "date-time"
|
|
43985
|
+
}
|
|
43986
|
+
}
|
|
43987
|
+
},
|
|
43988
|
+
"AiSpendTotals": {
|
|
43989
|
+
"type": "object",
|
|
43990
|
+
"properties": {
|
|
43991
|
+
"cost_usd": {
|
|
43992
|
+
"type": "number"
|
|
43993
|
+
},
|
|
43994
|
+
"tokens_input": {
|
|
43995
|
+
"type": "integer",
|
|
43996
|
+
"format": "int64"
|
|
43997
|
+
},
|
|
43998
|
+
"tokens_output": {
|
|
43999
|
+
"type": "integer",
|
|
44000
|
+
"format": "int64"
|
|
44001
|
+
},
|
|
44002
|
+
"tokens": {
|
|
44003
|
+
"type": "integer",
|
|
44004
|
+
"format": "int64"
|
|
44005
|
+
},
|
|
44006
|
+
"requests": {
|
|
44007
|
+
"type": "integer",
|
|
44008
|
+
"format": "int64"
|
|
44009
|
+
},
|
|
44010
|
+
"blocked": {
|
|
44011
|
+
"type": "integer",
|
|
44012
|
+
"format": "int64"
|
|
44013
|
+
},
|
|
44014
|
+
"unpriced_requests": {
|
|
44015
|
+
"type": "integer",
|
|
44016
|
+
"format": "int64"
|
|
44017
|
+
},
|
|
44018
|
+
"agents": {
|
|
44019
|
+
"type": "integer",
|
|
44020
|
+
"format": "int64"
|
|
44021
|
+
},
|
|
44022
|
+
"models": {
|
|
44023
|
+
"type": "integer",
|
|
44024
|
+
"format": "int64"
|
|
44025
|
+
},
|
|
44026
|
+
"avg_cost_per_day": {
|
|
44027
|
+
"type": "number"
|
|
44028
|
+
},
|
|
44029
|
+
"cost_per_request": {
|
|
44030
|
+
"type": "number"
|
|
44031
|
+
},
|
|
44032
|
+
"cost_per_mtok": {
|
|
44033
|
+
"type": "number"
|
|
44034
|
+
}
|
|
44035
|
+
}
|
|
44036
|
+
},
|
|
44037
|
+
"AiSpend": {
|
|
44038
|
+
"type": "object",
|
|
44039
|
+
"required": [
|
|
44040
|
+
"window",
|
|
44041
|
+
"totals",
|
|
44042
|
+
"previous",
|
|
44043
|
+
"series",
|
|
44044
|
+
"by_provider",
|
|
44045
|
+
"by_model",
|
|
44046
|
+
"by_agent",
|
|
44047
|
+
"limits",
|
|
44048
|
+
"generated_at"
|
|
44049
|
+
],
|
|
44050
|
+
"properties": {
|
|
44051
|
+
"generated_at": {
|
|
44052
|
+
"type": "string",
|
|
44053
|
+
"format": "date-time"
|
|
44054
|
+
},
|
|
44055
|
+
"window": {
|
|
44056
|
+
"type": "object",
|
|
44057
|
+
"properties": {
|
|
44058
|
+
"from": {
|
|
44059
|
+
"type": "string",
|
|
44060
|
+
"format": "date-time"
|
|
44061
|
+
},
|
|
44062
|
+
"to": {
|
|
44063
|
+
"type": "string",
|
|
44064
|
+
"format": "date-time"
|
|
44065
|
+
},
|
|
44066
|
+
"interval": {
|
|
44067
|
+
"type": "string"
|
|
44068
|
+
},
|
|
44069
|
+
"previous_from": {
|
|
44070
|
+
"type": "string",
|
|
44071
|
+
"format": "date-time"
|
|
44072
|
+
},
|
|
44073
|
+
"previous_to": {
|
|
44074
|
+
"type": "string",
|
|
44075
|
+
"format": "date-time"
|
|
44076
|
+
},
|
|
44077
|
+
"days": {
|
|
44078
|
+
"type": "number"
|
|
44079
|
+
}
|
|
44080
|
+
}
|
|
44081
|
+
},
|
|
44082
|
+
"totals": {
|
|
44083
|
+
"$ref": "#/components/schemas/AiSpendTotals"
|
|
44084
|
+
},
|
|
44085
|
+
"previous": {
|
|
44086
|
+
"$ref": "#/components/schemas/AiSpendTotals"
|
|
44087
|
+
},
|
|
44088
|
+
"series": {
|
|
44089
|
+
"type": "array",
|
|
44090
|
+
"items": {
|
|
44091
|
+
"type": "object",
|
|
44092
|
+
"properties": {
|
|
44093
|
+
"bucket": {
|
|
44094
|
+
"type": "string",
|
|
44095
|
+
"format": "date-time"
|
|
44096
|
+
},
|
|
44097
|
+
"provider": {
|
|
44098
|
+
"type": "string"
|
|
44099
|
+
},
|
|
44100
|
+
"cost_usd": {
|
|
44101
|
+
"type": "number"
|
|
44102
|
+
},
|
|
44103
|
+
"tokens": {
|
|
44104
|
+
"type": "integer",
|
|
44105
|
+
"format": "int64"
|
|
44106
|
+
},
|
|
44107
|
+
"requests": {
|
|
44108
|
+
"type": "integer",
|
|
44109
|
+
"format": "int64"
|
|
44110
|
+
}
|
|
44111
|
+
}
|
|
44112
|
+
}
|
|
44113
|
+
},
|
|
44114
|
+
"by_provider": {
|
|
44115
|
+
"type": "array",
|
|
44116
|
+
"items": {
|
|
44117
|
+
"type": "object",
|
|
44118
|
+
"properties": {
|
|
44119
|
+
"provider": {
|
|
44120
|
+
"type": "string"
|
|
44121
|
+
},
|
|
44122
|
+
"cost_usd": {
|
|
44123
|
+
"type": "number"
|
|
44124
|
+
},
|
|
44125
|
+
"tokens": {
|
|
44126
|
+
"type": "integer",
|
|
44127
|
+
"format": "int64"
|
|
44128
|
+
},
|
|
44129
|
+
"requests": {
|
|
44130
|
+
"type": "integer",
|
|
44131
|
+
"format": "int64"
|
|
44132
|
+
},
|
|
44133
|
+
"previous_cost_usd": {
|
|
44134
|
+
"type": "number"
|
|
44135
|
+
},
|
|
44136
|
+
"share_pct": {
|
|
44137
|
+
"type": "number"
|
|
44138
|
+
},
|
|
44139
|
+
"trend_pct": {
|
|
44140
|
+
"type": "number",
|
|
44141
|
+
"nullable": true
|
|
44142
|
+
}
|
|
44143
|
+
}
|
|
44144
|
+
}
|
|
44145
|
+
},
|
|
44146
|
+
"by_model": {
|
|
44147
|
+
"type": "array",
|
|
44148
|
+
"items": {
|
|
44149
|
+
"type": "object",
|
|
44150
|
+
"properties": {
|
|
44151
|
+
"provider": {
|
|
44152
|
+
"type": "string"
|
|
44153
|
+
},
|
|
44154
|
+
"model": {
|
|
44155
|
+
"type": "string"
|
|
44156
|
+
},
|
|
44157
|
+
"cost_usd": {
|
|
44158
|
+
"type": "number"
|
|
44159
|
+
},
|
|
44160
|
+
"tokens_input": {
|
|
44161
|
+
"type": "integer",
|
|
44162
|
+
"format": "int64"
|
|
44163
|
+
},
|
|
44164
|
+
"tokens_output": {
|
|
44165
|
+
"type": "integer",
|
|
44166
|
+
"format": "int64"
|
|
44167
|
+
},
|
|
44168
|
+
"requests": {
|
|
44169
|
+
"type": "integer",
|
|
44170
|
+
"format": "int64"
|
|
44171
|
+
},
|
|
44172
|
+
"previous_cost_usd": {
|
|
44173
|
+
"type": "number"
|
|
44174
|
+
},
|
|
44175
|
+
"priced": {
|
|
44176
|
+
"type": "boolean"
|
|
44177
|
+
},
|
|
44178
|
+
"share_pct": {
|
|
44179
|
+
"type": "number"
|
|
44180
|
+
},
|
|
44181
|
+
"trend_pct": {
|
|
44182
|
+
"type": "number",
|
|
44183
|
+
"nullable": true
|
|
44184
|
+
}
|
|
44185
|
+
}
|
|
44186
|
+
}
|
|
44187
|
+
},
|
|
44188
|
+
"by_agent": {
|
|
44189
|
+
"type": "array",
|
|
44190
|
+
"items": {
|
|
44191
|
+
"type": "object",
|
|
44192
|
+
"properties": {
|
|
44193
|
+
"agent_id": {
|
|
44194
|
+
"type": "string",
|
|
44195
|
+
"format": "uuid"
|
|
44196
|
+
},
|
|
44197
|
+
"agent_name": {
|
|
44198
|
+
"type": "string"
|
|
44199
|
+
},
|
|
44200
|
+
"is_active": {
|
|
44201
|
+
"type": "boolean"
|
|
44202
|
+
},
|
|
44203
|
+
"cost_usd": {
|
|
44204
|
+
"type": "number"
|
|
44205
|
+
},
|
|
44206
|
+
"tokens": {
|
|
44207
|
+
"type": "integer",
|
|
44208
|
+
"format": "int64"
|
|
44209
|
+
},
|
|
44210
|
+
"requests": {
|
|
44211
|
+
"type": "integer",
|
|
44212
|
+
"format": "int64"
|
|
44213
|
+
},
|
|
44214
|
+
"blocked": {
|
|
44215
|
+
"type": "integer",
|
|
44216
|
+
"format": "int64"
|
|
44217
|
+
},
|
|
44218
|
+
"top_model": {
|
|
44219
|
+
"type": "string",
|
|
44220
|
+
"nullable": true
|
|
44221
|
+
},
|
|
44222
|
+
"top_provider": {
|
|
44223
|
+
"type": "string",
|
|
44224
|
+
"nullable": true
|
|
44225
|
+
},
|
|
44226
|
+
"previous_cost_usd": {
|
|
44227
|
+
"type": "number"
|
|
44228
|
+
},
|
|
44229
|
+
"last_request_at": {
|
|
44230
|
+
"type": "string",
|
|
44231
|
+
"format": "date-time",
|
|
44232
|
+
"nullable": true
|
|
44233
|
+
},
|
|
44234
|
+
"daily_budget_usd": {
|
|
44235
|
+
"type": "number",
|
|
44236
|
+
"nullable": true
|
|
44237
|
+
},
|
|
44238
|
+
"today_cost_usd": {
|
|
44239
|
+
"type": "number"
|
|
44240
|
+
},
|
|
44241
|
+
"blocked_by_budget": {
|
|
44242
|
+
"type": "integer",
|
|
44243
|
+
"format": "int64"
|
|
44244
|
+
},
|
|
44245
|
+
"max_tokens_per_request": {
|
|
44246
|
+
"type": "integer",
|
|
44247
|
+
"format": "int64",
|
|
44248
|
+
"nullable": true
|
|
44249
|
+
},
|
|
44250
|
+
"max_requests_per_day": {
|
|
44251
|
+
"type": "integer",
|
|
44252
|
+
"format": "int64",
|
|
44253
|
+
"nullable": true
|
|
44254
|
+
},
|
|
44255
|
+
"share_pct": {
|
|
44256
|
+
"type": "number"
|
|
44257
|
+
},
|
|
44258
|
+
"trend_pct": {
|
|
44259
|
+
"type": "number",
|
|
44260
|
+
"nullable": true
|
|
44261
|
+
},
|
|
44262
|
+
"budget_used_pct": {
|
|
44263
|
+
"type": "number",
|
|
44264
|
+
"nullable": true
|
|
44265
|
+
}
|
|
44266
|
+
}
|
|
44267
|
+
}
|
|
44268
|
+
},
|
|
44269
|
+
"limits": {
|
|
44270
|
+
"type": "object",
|
|
44271
|
+
"properties": {
|
|
44272
|
+
"agents_with_daily_budget": {
|
|
44273
|
+
"type": "integer",
|
|
44274
|
+
"format": "int64"
|
|
44275
|
+
},
|
|
44276
|
+
"agents_over_80pct": {
|
|
44277
|
+
"type": "integer",
|
|
44278
|
+
"format": "int64"
|
|
44279
|
+
},
|
|
44280
|
+
"agents_at_cap": {
|
|
44281
|
+
"type": "integer",
|
|
44282
|
+
"format": "int64"
|
|
44283
|
+
},
|
|
44284
|
+
"blocked_by_budget": {
|
|
44285
|
+
"type": "integer",
|
|
44286
|
+
"format": "int64"
|
|
44287
|
+
},
|
|
44288
|
+
"router_keys": {
|
|
44289
|
+
"type": "array",
|
|
44290
|
+
"items": {
|
|
44291
|
+
"type": "object",
|
|
44292
|
+
"properties": {
|
|
44293
|
+
"key_id": {
|
|
44294
|
+
"type": "string",
|
|
44295
|
+
"format": "uuid"
|
|
44296
|
+
},
|
|
44297
|
+
"agent_id": {
|
|
44298
|
+
"type": "string",
|
|
44299
|
+
"format": "uuid"
|
|
44300
|
+
},
|
|
44301
|
+
"agent_name": {
|
|
44302
|
+
"type": "string"
|
|
44303
|
+
},
|
|
44304
|
+
"name": {
|
|
44305
|
+
"type": "string"
|
|
44306
|
+
},
|
|
44307
|
+
"spent_usd": {
|
|
44308
|
+
"type": "number"
|
|
44309
|
+
},
|
|
44310
|
+
"cap_usd": {
|
|
44311
|
+
"type": "number",
|
|
44312
|
+
"nullable": true
|
|
44313
|
+
},
|
|
44314
|
+
"last_used_at": {
|
|
44315
|
+
"type": "string",
|
|
44316
|
+
"format": "date-time",
|
|
44317
|
+
"nullable": true
|
|
44318
|
+
}
|
|
44319
|
+
}
|
|
44320
|
+
}
|
|
44321
|
+
},
|
|
44322
|
+
"credit_balance_usd": {
|
|
44323
|
+
"type": "number"
|
|
44324
|
+
},
|
|
44325
|
+
"inspection_fees_usd": {
|
|
44326
|
+
"type": "number"
|
|
44327
|
+
},
|
|
44328
|
+
"billing_tier": {
|
|
44329
|
+
"type": "string"
|
|
44330
|
+
}
|
|
44331
|
+
}
|
|
44332
|
+
}
|
|
44333
|
+
}
|
|
44334
|
+
},
|
|
43396
44335
|
"OrgOverview": {
|
|
43397
44336
|
"type": "object",
|
|
43398
44337
|
"required": [
|
|
@@ -44204,6 +45143,10 @@
|
|
|
44204
45143
|
"updated_at"
|
|
44205
45144
|
],
|
|
44206
45145
|
"properties": {
|
|
45146
|
+
"previous_image_digest": {
|
|
45147
|
+
"type": "string",
|
|
45148
|
+
"nullable": true
|
|
45149
|
+
},
|
|
44207
45150
|
"image_digest": {
|
|
44208
45151
|
"type": "string",
|
|
44209
45152
|
"nullable": true,
|