Get Single Model
API Documentation: Retrieve Model by Name
Endpoint
GET /v1/model/:modelNameDescription
This endpoint retrieves detailed information for a single AI model specified by the modelName path parameter.
Request
cURL Example:
curl --location 'https://api.1for.ai/v1/model/{modelName}' \
--header 'api-key: {API_KEY}'Replace {API_KEY} with your actual API key, and {modelName} with the desired model name.
Response
The response will be a single model object with the same structure as in the list endpoint. Example responses:
For a Text Model:
{
"modelName": String,
"pricePerMillionToken": {
"input": Double,
"output": Double
},
"platform": String,
"shortName": String,
"type": "text" (enum)
}For an Image Model:
{
"modelName": String,
"pricePerImage": Double,
"platform": String,
"shortName": String,
"type": "image" (enum)
}Notes
Use this endpoint when you want to query metadata and pricing for a specific model.
Ensure the model name passed in the URL exactly matches a known
modelNamevalue.Exact modelName can be obtained using this api endpoint
Last updated