Modellss Docs
    • Send Request
    • Model List and Price
    • Model APIs
      • Chat API
        • Chat
        • GPTs
        • gemini-pro
        • gpt-4-all(Image)
        • gpt-4-vision-preview
      • Chat Completions API
        • Chat Completions API
      • Image API
        • Midjourney
          • InsightFace task submission
            • Submit swap_face task
          • Task Submission
            • Perform Action
            • Submit Blend Task
            • Submit a Describe task
            • Submit a Imagine task
            • Submit Modal
            • Submit Shorten Task
          • Task Inquiry
            • Inquire about all tasks
            • Inquire about tasks based on a list of IDs
            • Paged query for tasks
            • Inquire about the task queue
            • Cancel task
            • Retrieve task with specified ID
            • Get the seed for the task image
        • DALL·E 3
        • Stable Diffusion
        • MJ Chat
        • gpt-4-all(generate images)
      • Embedding Vector Generation Interface (Embeddings)
        • Create Embeddings
      • Audio
        • Create transcription
        • Create translation
        • Text to speech
    • Help Center
      • FAQ
    • Schemas
      • Schemas
        • Blend提交参数
        • CheckActivationDTO
        • Describe提交参数
        • Discord账号
        • Filter
        • Imagine提交参数
        • Map«string,object»
        • Message«Discord账号»
        • Message«Map«string,object»»
        • Message«Void»
        • Message«string»
        • Modal提交参数
        • Option
        • Pageable
        • Page«Map«string,object»»
        • Page«任务»
        • Shorten提交参数
        • Sort
        • SwapFace提交参数
        • TaskQueryDTO
        • 任务
        • 任务查询参数
        • 变化任务提交参数
        • 变化任务提交参数-simple
        • 可执行按钮
        • 可执行按钮_1
        • 执行动作参数
        • 提交结果
        • 激活服务参数
        • 账号修改参数
        • 账号创建参数
        • 账号查询参数
        • 账号筛选条件

    Send Request

    You can paste the following command into your terminal to execute your first API request. Ensure that you replace YOUR_API_KEY with the token you generated in the Modelless Hub dashboard (sk-xxx).
    This request queries the model to complete the text starting with the prompt “Say this is a test gpt-3.5-turbo”. You should receive a response similar to the following:
    
    1 {
    2    "id":"chatcmpl-abc123",
    3    "object":"chat.completion",
    4    "created":1677858242,
    5    "model":"gpt-3.5-turbo-0301",
    6    "usage":{
    7       "prompt_tokens":13,
    8       "completion_tokens":7,
    9       "total_tokens":20
    10    },
    11    "choices":[
    12       {
    13          "message":{
    14             "role":"assistant",
    15             "content":"\n\nThis is a test!"
    16          },
    17          "finish_reason":"stop",
    18          "index":0
    19       }
    20    ]
    21 }
    You have now generated your first chat completion. We observe that finish_reason is stop, indicating that the API has returned a complete output generated by the model. In the previous request, we generated only one message, but you can set the n parameter to generate multiple message options. In this example, gpt-3.5-turbo is primarily used for traditional text completion tasks. The model is also optimized for chat applications.
    Modified at 2024-02-29 12:46:37
    Next
    Model List and Price
    Built with