User level tracking of usage

Hi, I’m having an issue with tracking user level usage on Openai Chat Completion API.
My request looks like this:

    "model": "gpt-3.5-turbo",
    "messages": [
        "role": "system",
        "content": "You are a helpful assistant."
        "role": "user",
        "content": "Hello!"
        "user": "testUser"

Although when I’m tracing the usage report via ‘/v1/usage’ API, I’m getting the user_id field as null. What could be the possible reason of this? If anyone can help me on resolving this, it would be really great. Thanks!

The reason for that is the “usage” api is not documented and is for providing information to the OpenAI account web site page by its own authentication.

Welcome to the forum.

The usage page isn’t meant to track your end users. You’ll need to do that on your own on the back-end.

Then what is the use of “user” field in chat completion prompt? Can we utilise it to track user level usage?

It’s meant, I believe, to track “bad actors,” so that you can know which users are trying to get past moderation. OpenAI might ask for it if you lose your account due to multiple bad generations - as in it shows you’re serious about producing only “safe” content as per their terms. It’s not required, however.