Skip to documentation
Open dashboard
On this page

GET /v1/models

Read the selected owned resource or current workflow state without starting a new generation.

Request example#

curl 'https://platform.tongai.io/v1/models' \  -H "Authorization: Bearer $TONG_API_KEY"
Configuration
curl --version

Authentication#

Use a server-side API key for your account, or OAuth for each customer’s account. Never send keys in prompts or tool arguments.

catalog:read

Parameters#

modelstringOptional

Choose a public Tong model ID from current discovery.

operationstringOptional

Select the workflow supported by the chosen model.

Request body#

This endpoint has no request body.

Response schema#

JSON
{  "workflows": []}

HTTP 200

application/json
text_modelsobject[]Optional
Show nested fields
idstringRequired
namestringRequired
context_tokensintegerRequired

Maximum: 9007199254740991.

max_output_tokensintegerRequired

Maximum: 9007199254740991.

unitstringRequired
Allowed values"THOUSAND_TOKENS"
input_creditsstringRequired

A decimal string with six decimal places, for example 1.250000.

output_creditsstringRequired

A decimal string with six decimal places, for example 1.250000.

cached_input_creditsstringRequired

A decimal string with six decimal places, for example 1.250000.

cache_write_creditsstringRequired

A decimal string with six decimal places, for example 1.250000.

pricingstringRequired
Allowed values"display_maximum"
requires_exact_quotebooleanRequired
Allowed valuestrue
workflowsobject[]Required

Maximum items: 10000.

Show nested fields
operationstringRequired
modelstringRequired
namestringRequired
model_namestringRequired
resolutionstring | nullRequired
unitstringRequired
creditsstring | nullRequired

A decimal string with six decimal places, for example 1.250000.

base_creditsstring | nullRequired

A decimal string with six decimal places, for example 1.250000.

requires_exact_quotebooleanOptional

Default: false.

pricingstringOptional
Allowed values"configuration_quote""display_rate"

Default: "display_rate".

discount_percentnumberRequired

Minimum: 0.

Maximum: 100.

Errors and limits#

HTTPErrorRecovery
400Invalid requestREQUEST_INVALIDCorrect the fields identified by the error before trying again.
401Invalid credentialCREDENTIAL_INVALIDCheck the credential, its expiry and whether it has been revoked.
402Insufficient creditsINSUFFICIENT_CREDITSAdd credits to the account that owns the credential, then continue the saved work.
403Permission deniedSCOPE_REQUIREDUse a credential with the required scopes and access to the selected resource.
404Resource unavailableRESOURCE_UNAVAILABLECheck the resource ID and that it belongs to the authorized account.
409Intent conflictIDEMPOTENCY_CONFLICTReuse an intent only with its original request. Use a new UUID for a different action.
429Rate limitedRATE_LIMITEDWait for Retry-After before retrying the same intended request.
503Temporarily unavailableDEPENDENCY_UNAVAILABLEWait for Retry-After and retry with the same intent. Check the saved operation after a timeout.