Record authoritative content-free evidence for one ambiguous supplier attempt
POST
/
api
/
v1
/
admin
/
model-api
/
usage-reservations
/
{id}
/
evidence
Record authoritative content-free evidence for one ambiguous supplier attempt
curl --request POST \
--url http://127.0.0.1:18000/api/v1/admin/model-api/usage-reservations/{id}/evidence \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"customer_tenant_id": "<string>",
"evidence_reference": "<string>",
"observed_at": "2023-11-07T05:31:56Z",
"cached_input_tokens": 1,
"input_tokens": 1,
"output_tokens": 1,
"supplier_request_id": "<string>"
}
'import requests
url = "http://127.0.0.1:18000/api/v1/admin/model-api/usage-reservations/{id}/evidence"
payload = {
"customer_tenant_id": "<string>",
"evidence_reference": "<string>",
"observed_at": "2023-11-07T05:31:56Z",
"cached_input_tokens": 1,
"input_tokens": 1,
"output_tokens": 1,
"supplier_request_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
customer_tenant_id: '<string>',
evidence_reference: '<string>',
observed_at: '2023-11-07T05:31:56Z',
cached_input_tokens: 1,
input_tokens: 1,
output_tokens: 1,
supplier_request_id: '<string>'
})
};
fetch('http://127.0.0.1:18000/api/v1/admin/model-api/usage-reservations/{id}/evidence', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://127.0.0.1:18000/api/v1/admin/model-api/usage-reservations/{id}/evidence"
payload := strings.NewReader("{\n \"customer_tenant_id\": \"<string>\",\n \"evidence_reference\": \"<string>\",\n \"observed_at\": \"2023-11-07T05:31:56Z\",\n \"cached_input_tokens\": 1,\n \"input_tokens\": 1,\n \"output_tokens\": 1,\n \"supplier_request_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"content_recorded": false,
"created": true,
"data": {
"authority": "supplier_adapter",
"customer_tenant_id": "<string>",
"evidence_reference": "<string>",
"observed_at": "2023-11-07T05:31:56Z",
"outcome": "usage",
"recorded_at": "2023-11-07T05:31:56Z",
"recorded_by": "<string>",
"reservation_id": "<string>",
"supplier": "<string>",
"cached_input_tokens": 1,
"input_tokens": 1,
"output_tokens": 1,
"supplier_request_id": "<string>"
},
"reconciliation": "queued"
}{
"error": {
"code": "<string>",
"message": "<string>",
"category": "<string>",
"remediation": "<string>",
"request_id": "<string>",
"retryable": true
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Minimum string length:
1Body
application/json
Minimum string length:
1Required string length:
1 - 512Available options:
usage, no_charge Required range:
x >= 0Required range:
x >= 0Required range:
x >= 0Maximum string length:
256⌘I
Record authoritative content-free evidence for one ambiguous supplier attempt
curl --request POST \
--url http://127.0.0.1:18000/api/v1/admin/model-api/usage-reservations/{id}/evidence \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"customer_tenant_id": "<string>",
"evidence_reference": "<string>",
"observed_at": "2023-11-07T05:31:56Z",
"cached_input_tokens": 1,
"input_tokens": 1,
"output_tokens": 1,
"supplier_request_id": "<string>"
}
'import requests
url = "http://127.0.0.1:18000/api/v1/admin/model-api/usage-reservations/{id}/evidence"
payload = {
"customer_tenant_id": "<string>",
"evidence_reference": "<string>",
"observed_at": "2023-11-07T05:31:56Z",
"cached_input_tokens": 1,
"input_tokens": 1,
"output_tokens": 1,
"supplier_request_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
customer_tenant_id: '<string>',
evidence_reference: '<string>',
observed_at: '2023-11-07T05:31:56Z',
cached_input_tokens: 1,
input_tokens: 1,
output_tokens: 1,
supplier_request_id: '<string>'
})
};
fetch('http://127.0.0.1:18000/api/v1/admin/model-api/usage-reservations/{id}/evidence', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://127.0.0.1:18000/api/v1/admin/model-api/usage-reservations/{id}/evidence"
payload := strings.NewReader("{\n \"customer_tenant_id\": \"<string>\",\n \"evidence_reference\": \"<string>\",\n \"observed_at\": \"2023-11-07T05:31:56Z\",\n \"cached_input_tokens\": 1,\n \"input_tokens\": 1,\n \"output_tokens\": 1,\n \"supplier_request_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"content_recorded": false,
"created": true,
"data": {
"authority": "supplier_adapter",
"customer_tenant_id": "<string>",
"evidence_reference": "<string>",
"observed_at": "2023-11-07T05:31:56Z",
"outcome": "usage",
"recorded_at": "2023-11-07T05:31:56Z",
"recorded_by": "<string>",
"reservation_id": "<string>",
"supplier": "<string>",
"cached_input_tokens": 1,
"input_tokens": 1,
"output_tokens": 1,
"supplier_request_id": "<string>"
},
"reconciliation": "queued"
}{
"error": {
"code": "<string>",
"message": "<string>",
"category": "<string>",
"remediation": "<string>",
"request_id": "<string>",
"retryable": true
}
}