chat/completions

Follows the exact same API spec as OpenAI's Chat API https://platform.openai.com/docs/api-reference/chat

curl -X POST http://localhost:4000/v1/chat/completions 
-H "Content-Type: application/json" 
-H "Authorization: Bearer sk-1234" 
-d '{
    "model": "gpt-4o",
    "messages": [
        {
            "role": "user",
            "content": "Hello!"
        }
    ]
}'
post/v1/chat/completions

Request

  • Base URL
    https://api.flock.io (the document declares no server; this is the origin it was published from)
  • URL
    https://api.flock.io/v1/chat/completions
  • Auth
    API key in header x-litellm-api-key

Request body

modelstring required
frequency_penaltynumber nullable
logit_biasobject nullable
logprobsboolean nullable
top_logprobsinteger nullable
max_tokensinteger nullable
ninteger nullable
presence_penaltynumber nullable
response_formatobject nullable
seedinteger nullable
service_tierstring nullable
stream_optionsobject nullable
temperaturenumber nullable
top_pnumber nullable
toolsobject[] nullable
parallel_tool_callsboolean nullable
functionsobject[] nullable
userstring nullable
streamboolean nullable
metadataobject nullable
guardrailsstring[] nullable
cachingboolean nullable
num_retriesinteger nullable
context_window_fallback_dictobject nullable
fallbacksstring[] nullable

Example request

{
  "messages": [
    {
      "role": "user",
      "content": "Hello, how are you?"
    }
  ]
}

Response

Successful Response

unknown required

Changes

    • breaking

      the ///// request property type changed from object to no type

    • warning

      removed the request property //////

    • warning

      removed the request property //////

    • warning

      removed the request property //////

    • info

      added the new optional request property ////

    • info

      added the new optional request property ////////

    • info

      added the new optional request property ////

    • info

      added the new optional request property ////////

    • info

      added the new optional request property /////////

    • info

      added the new optional request property /////////

    • info

      added the new optional request property /////////

    • info

      added the new optional request property /////////

    • info

      added the new optional request property ////

    • info

      added the new optional request property ///////

    • info

      added the new optional request property ////

    • info

      added to the ///// request property anyOf list

    • info

      request property /////// list-of-types was widened by adding types null to media type application/json

    • info

      request property /////// list-of-types was widened by adding types null to media type application/json

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status