# Gestione del conto
## Interroga il saldo
> **GET** `/v3/account/balance`
Interrogare il saldo creditore del conto corrente.
### Richiedi parametri
#### Richiedi intestazioni
| Parametro | Digitare | Obbligatorio | Predefinito | Descrizione |
| :-: | :-: | :-: | :-: | :-: |
| Authorization | stringa | Sì | — | `Bearer {api_key}` |
#### Richiedi esempio
##### curl
```bash
curl -X GET https://openapi.tripo3d.ai/v3/account/balance \
-H "Authorization: Bearer {api_key}"
```
##### Python
```python
import requests
url = "https://openapi.tripo3d.ai/v3/account/balance"
headers = {
"Authorization": "Bearer {api_key}"
}
response = requests.get(url, headers=headers)
print(response.json())
```
##### JavaScript
```javascript
const url = "https://openapi.tripo3d.ai/v3/account/balance";
const response = await fetch(url, {
headers: {
"Authorization": "Bearer {api_key}"
}
});
const data = await response.json();
console.log(data);
```
### Risposta
#### Risposta riuscita
```json
{
"code": 0,
"data": {
"balance": 10000.00,
"frozen": 200.00
}
}
```
#### Campi di risposta
| Parametro | Digitare | Descrizione |
| :-: | :-: | :-: |
| code | intero | Codice di stato. `0` indica successo |
| data.balance | number | Saldo del credito disponibile |
| data.frozen | number | Crediti congelati, riservati per attività in corso |
---
## Dettagli sull'utilizzo della query
> **GET** `/v3/account/usage`
Richiedi i dettagli sull'utilizzo del credito per l'account.
### Richiedi parametri
#### Richiedi intestazioni
| Parametro | Digitare | Obbligatorio | Predefinito | Descrizione |
| :-: | :-: | :-: | :-: | :-: |
| Authorization | stringa | Sì | — | `Bearer {api_key}` |
#### Richiedi esempio
##### curl
```bash
curl -X GET https://openapi.tripo3d.ai/v3/account/usage \
-H "Authorization: Bearer {api_key}"
```
##### Python
```python
import requests
url = "https://openapi.tripo3d.ai/v3/account/usage"
headers = {
"Authorization": "Bearer {api_key}"
}
response = requests.get(url, headers=headers)
print(response.json())
```
##### JavaScript
```javascript
const url = "https://openapi.tripo3d.ai/v3/account/usage";
const response = await fetch(url, {
headers: {
"Authorization": "Bearer {api_key}"
}
});
const data = await response.json();
console.log(data);
```
### Risposta
#### Risposta riuscita
```json
{
"code": 0,
"data": [
{
"task_id": "task_abc123",
"type": "text_to_model",
"credits_consumed": 100.00,
"created_at": "2025-01-01T00:00:00Z"
}
]
}
```
#### Campi di risposta
| Parametro | Digitare | Descrizione |
| :-: | :-: | :-: |
| code | intero | Codice di stato. `0` indica successo |
| data | matrice | Elenco dei dettagli di utilizzo |
| dati[].task_id | stringa | Identificatore univoco dell'attività |
| dati[].tipo | stringa | Tipo di attività |
| dati[].credits_consumed | number | Crediti consumati |
| dati[].created_at | stringa | Ora di creazione (ISO 8601) |
Gestione del conto
Interroga il saldo
GET /v3/account/balance
Interrogare il saldo creditore del conto corrente.
Richiedi parametri
Richiedi intestazioni
| Parametro |
Digitare |
Obbligatorio |
Predefinito |
Descrizione |
| Authorization |
stringa |
Sì |
— |
Bearer {api_key} |
Richiedi esempio
curl -X GET https://openapi.tripo3d.ai/v3/account/balance \
-H "Authorization: Bearer {api_key}"
import requests
url = "https://openapi.tripo3d.ai/v3/account/balance"
headers = {
"Authorization": "Bearer {api_key}"
}
response = requests.get(url, headers=headers)
print(response.json())
const url = "https://openapi.tripo3d.ai/v3/account/balance";
const response = await fetch(url, {
headers: {
"Authorization": "Bearer {api_key}"
}
});
const data = await response.json();
console.log(data);
Risposta
Risposta riuscita
{
"code": 0,
"data": {
"balance": 10000.00,
"frozen": 200.00
}
}
Campi di risposta
| Parametro |
Digitare |
Descrizione |
| code |
intero |
Codice di stato. 0 indica successo |
| data.balance |
number |
Saldo del credito disponibile |
| data.frozen |
number |
Crediti congelati, riservati per attività in corso |
Dettagli sull’utilizzo della query
GET /v3/account/usage
Richiedi i dettagli sull’utilizzo del credito per l’account.
Richiedi parametri
Richiedi intestazioni
| Parametro |
Digitare |
Obbligatorio |
Predefinito |
Descrizione |
| Authorization |
stringa |
Sì |
— |
Bearer {api_key} |
Richiedi esempio
curl -X GET https://openapi.tripo3d.ai/v3/account/usage \
-H "Authorization: Bearer {api_key}"
import requests
url = "https://openapi.tripo3d.ai/v3/account/usage"
headers = {
"Authorization": "Bearer {api_key}"
}
response = requests.get(url, headers=headers)
print(response.json())
const url = "https://openapi.tripo3d.ai/v3/account/usage";
const response = await fetch(url, {
headers: {
"Authorization": "Bearer {api_key}"
}
});
const data = await response.json();
console.log(data);
Risposta
Risposta riuscita
{
"code": 0,
"data": [
{
"task_id": "task_abc123",
"type": "text_to_model",
"credits_consumed": 100.00,
"created_at": "2025-01-01T00:00:00Z"
}
]
}
Campi di risposta
| Parametro |
Digitare |
Descrizione |
| code |
intero |
Codice di stato. 0 indica successo |
| data |
matrice |
Elenco dei dettagli di utilizzo |
| dati[].task_id |
stringa |
Identificatore univoco dell’attività |
| dati[].tipo |
stringa |
Tipo di attività |
| dati[].credits_consumed |
number |
Crediti consumati |
| dati[].created_at |
stringa |
Ora di creazione (ISO 8601) |