Ikhtisar
Gunakan endpoint ini untuk memperbarui nama, batas penggunaan, model yang diizinkan, masa berlaku, atau status API key user yang ada.Body Request
Setidaknya satu field harus disediakan.| Bidang | Tipe | Default / Batas | Catatan |
|---|---|---|---|
status | enum | - | active, inactive, revoked |
name | string | panjang 1-50 | Nama tampilan yang diperbarui |
limitAmount | number | null | min 0, max input 1000000 | null = tidak terbatas, 0 = kuota nol. Nilai positif dinormalisasi menjadi batas simpan yang tidak melebihi setara 100000 USD |
limitCurrency | enum | default USD | Hanya USD. Mengirim CNY menghasilkan 400 currency_retired. |
models | string[] | - | Daftar izin model yang diperbarui |
expiresAt | string | null | datetime RFC3339 | null menghapus masa kedaluwarsa |
Catatan
- Hard delete memang tidak didukung di Management API v1.
revokedbersifat terminal untuk penggunaan operasional biasa; buat key baru daripada mengharapkan alur un-revoke di masa depan.
Contoh
Request / Respons
Gunakan panel OpenAPI interaktif di atas untuk skema dan field respons yang tepat.Response example
Important fields
API key identifier used in follow-up Management API calls.
Display name for the API key.
Non-secret key prefix for display and support.
One of
active, inactive, or revoked.Spending cap in USD as a JSON number for display.
null means unlimited.Exact spending cap in USD as a decimal string.
null means unlimited.Accumulated usage in USD as a JSON number for display.
Exact accumulated usage in USD as a decimal string.
Per-key model allowlist. Empty array means no additional key-level model restriction.
ISO timestamp when the key expires, or
null for no expiry.ISO timestamp for the most recent use, or
null when unused.ISO creation timestamp.