Hi,
After a chat completion, it provides response time and input and output tokens. Is there a way to retrieve response value via API? Haven’t found a way in the docs.
Thanks!
Hi,
After a chat completion, it provides response time and input and output tokens. Is there a way to retrieve response value via API? Haven’t found a way in the docs.
Thanks!
For a Chat Completions call, for an API developer, the response is ephemeral, only delivered once.
If you set the API parameter "store": true
, and also enable that logging in the platform site, then you can see the chat completions calls in the dashboard logs in that user interface, but you aren’t given the same API access to recall them again yourself.
They remain for 30 days and you have no delete ability.
The Responses endpoint with store
offers an endpoint method to retrieve the stored input or output again by API call, by ID. The retention period may be quite long. There is no list method.
If you like “response time”, you might like the durations you can also gather from headers that are returned:
[
"openai-processing-ms",
"340"
],
[
"x-envoy-upstream-service-time",
"344"
],
[
"x-ratelimit-limit-requests",
"30000"
],
...