1For AI
  • Welcome
  • Getting Started
    • Quickstart
  • Model
    • Retrieve Model List
    • Get Single Model
  • Chat
    • Create new chat
    • Continue Chat Conversation
  • User
    • User Balance
  • Errors
    • Common Errors
Powered by GitBook
On this page
  1. Model

Get Single Model

API Documentation: Retrieve Model by Name

Endpoint

GET /v1/model/:modelName

Description

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 modelName value.

PreviousRetrieve Model ListNextCreate new chat

Last updated 1 month ago

Exact modelName can be obtained using

this api endpoint