POST
/
api
/
v1
/
invoke_llm
curl --request POST \
  --url https://api.b-bot.space/api/v1/invoke_llm \
  --header 'Content-Type: application/json' \
  --header 'bbot-api-key: <api-key>' \
  --data '{
  "expert_id": 37,
  "model_id": 6,
  "input_data": [
    {
      "role": "user",
      "content": "Hello!"
    }
  ],
  "temperature": 1,
  "max_tokens": 250
}'
{
  "response": {
    "id": "chatcmpl-9kCotn4TY5OcxYc8qFlulso5v8BpC",
    "choices": [
      {
        "finish_reason": "stop",
        "index": 0,
        "logprobs": null,
        "message": {
          "content": "Hello! How can I assist you today in the realm of marketing psychology for your business?",
          "role": "assistant",
          "function_call": null,
          "tool_calls": null
        }
      }
    ],
    "created": 1720799395,
    "model": "gpt-3.5-turbo-0125",
    "object": "chat.completion",
    "system_fingerprint": null,
    "usage": {
      "completion_tokens": 18,
      "prompt_tokens": 40,
      "total_tokens": 58
    }
  }
}

Ensure that you replace YOUR_API_KEY_HERE with the actual API key generated from your profile in the B-Bot hub.

The temperature parameter is optional. If not provided, a default value will be used.

The max_tokens parameter is optional. If not provided, a default value will be used.

Authorizations

bbot-api-key
string
header
required

API key for authentication

Body

application/json
This endpoint allows you to invoke a language model using specific parameters, such as the expert and model IDs, input data, and additional configuration options.
expert_id
integer
required

The ID of the expert you want to invoke.

model_id
integer
required

The ID of the language model to be used.

input_data
object[]
required

A list of message objects containing the role and content of the input data.

temperature
number

The sampling temperature, which controls the randomness of the model's outputs.

max_tokens
integer

The maximum number of tokens (words or word pieces) to generate in the response.

Response

200
application/json
Successful response with generated content
response
object