Skip to main content

Chat/Completions

POST 

/v1/chat/completions

Chat/Completions

Takes a OpenAI input payload, and then forwards the appropriate request on to the Takeoff server. Note: some OpenAI parameters are not supported, see supported parameters.

See more on the structure of openAI's API here See more on the structure of messages here.

Request​

Body

required

    frequency_penaltyfloatnullable
    function_callstringnullable
    functionsstring[]nullable

    logit_bias

    object

    nullable

    property name*float
    logprobsbooleannullable
    max_tokensint64nullable

    messages

    object[]

    required

  • Array [

  • content

    object

    required

    oneOf

    string

    rolestringrequired
  • ]

  • modelstringnullable
    nint64nullable
    presence_penaltyfloatnullable
    response_formatstringnullable
    seedint64nullable
    stopstringnullable
    streamboolean
    temperaturefloatnullable
    tool_choicestringnullable
    toolsstringnullable
    top_logprobsint32nullable
    top_pfloatnullable
    userstringnullable

Responses​

Takes in a JSON payload and returns the response all at once.

Schema

    choices

    object[]

    required

  • Array [

  • finish_reasonstringrequired
    indexint32required
    logprobsstringrequired

    text

    object

    required

    Input Text used for ease of users not to have to use the clunky PayloadText. Mapping provided below to convert InputText to PayloadText.

    oneOf

    string

  • ]

  • createdint64
    idstring
    modelstringrequired
    objectstring
    usagestring