curl --request POST \
--url https://api.example.com/tokens \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"type": "<string>",
"value": "<string>",
"currency": "<string>"
}
'{
"tokenId": "019525fd-f5cc-7dc1-c9e5-1f3a5b7d9e1b",
"name": "Planning Token",
"description": "LLM planning token",
"type": "PLANNING",
"value": "0.005",
"currency": "USD",
"status": "ACTIVE",
"createdBy": "019525fd-56a8-7db4-8c3e-2a1b4d6f8e0c",
"createdAt": "2026-03-25T14:00:00.000Z",
"updatedBy": "019525fd-56a8-7db4-8c3e-2a1b4d6f8e0c",
"updatedAt": "2026-03-25T14:00:00.000Z"
}
Criar um novo pacote de tokens com quantidade de unidades e preco.
curl --request POST \
--url https://api.example.com/tokens \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"type": "<string>",
"value": "<string>",
"currency": "<string>"
}
'{
"tokenId": "019525fd-f5cc-7dc1-c9e5-1f3a5b7d9e1b",
"name": "Planning Token",
"description": "LLM planning token",
"type": "PLANNING",
"value": "0.005",
"currency": "USD",
"status": "ACTIVE",
"createdBy": "019525fd-56a8-7db4-8c3e-2a1b4d6f8e0c",
"createdAt": "2026-03-25T14:00:00.000Z",
"updatedBy": "019525fd-56a8-7db4-8c3e-2a1b4d6f8e0c",
"updatedAt": "2026-03-25T14:00:00.000Z"
}
token:write.AUDIO_TO_TEXT, IMAGE_TO_TEXT, MEMORY, PLANNING, RESPONSE, RETRIEVAL, SUMMARY, TOOLS, TRANSCRIPTION, WEBSCRAPING.USD, BRL, EUR.{
"tokenId": "019525fd-f5cc-7dc1-c9e5-1f3a5b7d9e1b",
"name": "Planning Token",
"description": "LLM planning token",
"type": "PLANNING",
"value": "0.005",
"currency": "USD",
"status": "ACTIVE",
"createdBy": "019525fd-56a8-7db4-8c3e-2a1b4d6f8e0c",
"createdAt": "2026-03-25T14:00:00.000Z",
"updatedBy": "019525fd-56a8-7db4-8c3e-2a1b4d6f8e0c",
"updatedAt": "2026-03-25T14:00:00.000Z"
}
curl -X POST https://api.awsales.io/admin/tokens \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Response Token",
"description": "Token consumed per response generation",
"type": "RESPONSE",
"value": "0.005",
"currency": "BRL"
}'
| Status | Codigo | Descricao |
|---|---|---|
400 | validation_error | Entrada invalida ou campos obrigatorios ausentes |
401 | unauthorized | Autenticacao ausente ou invalida |
403 | forbidden | Permissoes insuficientes |
409 | token.name_type_currency_already_exists | Token with same name, type, and currency already exists |
500 | internal_server_error | Ocorreu um erro inesperado |