Get the current key
get_meGET/v1/meBeta
Returns the API key in use, its scopes and the plan of the account it belongs to.
Beta. This endpoint is supported and can gain new fields. If a change would break your code, we tell you before it takes effect and list it in the changelog.
About
Call this first to check that a key works and what it may do, before you upload or spend anything. It returns the id of the key that made the request, its scopes and the plan of its account. It changes nothing and uses no credits.
Example use
A deployment script calls this once at startup with the key it was given. It checks that the key has the spend scope, and stops before it uploads anything when the scope is missing.
Endpoint
GET https://api.gpt-video.com/v1/me- Scope
clips:read. - Rate limit 120 requests a minute for each key and 240 for each account, shared by every
readcall. See rate limits. - No
Idempotency-Key.
Parameters
This operation takes no parameters.
Request
Check a key before using it.
curl "https://api.gpt-video.com/v1/me" \
-H "Authorization: Bearer $GPT_VIDEO_API_KEY"const res = await fetch("https://api.gpt-video.com/v1/me", {
method: "GET",
headers: {
"Authorization": `Bearer ${process.env.GPT_VIDEO_API_KEY}`,
},
});
const data = await res.json();
console.log(data);import os
import requests
r = requests.get(
"https://api.gpt-video.com/v1/me",
headers={
"Authorization": f"Bearer {os.environ['GPT_VIDEO_API_KEY']}",
},
)
data = r.json()
print(data){
"method": "tools/call",
"params": {
"name": "get_me",
"arguments": {}
}
}Response
A successful call answers HTTP 200.
Fields to check
| Name | Type | Description |
|---|---|---|
key.id | string | The id of the API key that made the request. It starts with mck_; the secret itself is never shown again. |
Response example
{
"key": {
"id": "mck_5f2c9e1a7b3d8046",
"scopes": [
"clips:read",
"clips:write",
"spend"
]
},
"account": {
"plan": "creator"
}
}All response fields
| Name | Type | Required | Description |
|---|---|---|---|
key | object | Required | The API key that made the request. |
key.id | string | Required | The id of the API key that made the request. It starts with mck_; the secret itself is never shown again. |
key.scopes | array of strings | Required | What the key may do: clips:read reads, clips:write changes things, spend uses credits or the daily export allowance (analyses and exports). |
account | object | Required | The account the key belongs to. |
account.plan | string | Required | The plan of the account the key belongs to. One of free, starter, creator, studio, unlimited. |
Errors
Every call can also answer these errors. VALIDATION_FAILED, UNKNOWN_PARAMETER, UNAUTHORIZED, SCOPE_MISSING, RATE_LIMITED, INTERNAL, UNAVAILABLE.
Cost
No credits are used.
Related operations
get_credits(GET /v1/credits) Get the credit balance
Questions
Does this call use credits or count against a limit?
It uses no credits. It counts as one read against the rate limit of the key, like any other read.
How do I get a key with more scopes?
Create a new key in the GPT-Video app with the scopes you need, then revoke the old one.
Why is there no account id in the response?
Every call already works on the account of its key, so no operation takes an account id.