AI

Create AI copilot

Changed on

This endpoint creates a new AI copilot with the given configuration. Corresponds to liveblocks.createAiCopilot.

post/ai/copilots

Request

  • Base URL: https://api.liveblocks.io/v2
  • URL: https://api.liveblocks.io/v2/ai/copilots
  • Auth: none declared

Request body

OR
OR
OR

Example request

{
  "name": "My Copilot",
  "systemPrompt": "You are a helpful assistant.",
  "providerApiKey": "sk-...",
  "provider": "openai",
  "providerModel": "gpt-4o"
}

Response

Created. Returns the created AI copilot.

OR
OR
OR

Example response

{
  "type": "copilot",
  "id": "cp_abc123",
  "name": "My Copilot",
  "systemPrompt": "You are a helpful assistant.",
  "alwaysUseKnowledge": true,
  "createdAt": "2024-06-01T12:00:00.000Z",
  "updatedAt": "2024-06-01T12:00:00.000Z",
  "provider": "openai",
  "providerModel": "gpt-4o",
  "settings": {
    "maxTokens": 4096,
    "temperature": 0.7
  }
}

Changes

    • warning

      added the new claude-opus-4-5-20251101 enum value to the // response property for the response status

    • warning

      added the new claude-opus-4-6 enum value to the // response property for the response status

    • warning

      added the new claude-opus-4-7 enum value to the // response property for the response status

    • warning

      added the new claude-sonnet-4-6 enum value to the // response property for the response status

    • warning

      added the new gemini-3-flash-preview enum value to the // response property for the response status

    • warning

      added the new gemini-3.1-pro-preview enum value to the // response property for the response status

    • warning

      added the new gpt-5-pro enum value to the // response property for the response status

    • warning

      added the new gpt-5.2 enum value to the // response property for the response status

    • warning

      added the new gpt-5.2-pro enum value to the // response property for the response status

    • warning

      added the new gpt-5.4 enum value to the // response property for the response status

    • warning

      added the new gpt-5.4-mini enum value to the // response property for the response status

    • warning

      added the new gpt-5.4-nano enum value to the // response property for the response status

    • warning

      added the new gpt-5.4-pro enum value to the // response property for the response status

    • warning

      added the new gpt-5.5 enum value to the // response property for the response status

    • info

      added the new claude-opus-4-5-20251101 enum value to the request property /////

    • info

      added the new claude-opus-4-6 enum value to the request property /////

    • info

      added the new claude-opus-4-7 enum value to the request property /////

    • info

      added the new claude-sonnet-4-6 enum value to the request property /////

    • info

      added the new gemini-3-flash-preview enum value to the request property /////

    • info

      added the new gemini-3.1-pro-preview enum value to the request property /////

    • info

      added the new gpt-5-pro enum value to the request property /////

    • info

      added the new gpt-5.2 enum value to the request property /////

    • info

      added the new gpt-5.2-pro enum value to the request property /////

    • info

      added the new gpt-5.4 enum value to the request property /////

    • info

      added the new gpt-5.4-mini enum value to the request property /////

    • info

      added the new gpt-5.4-nano enum value to the request property /////

    • info

      added the new gpt-5.4-pro enum value to the request property /////

    • info

      added the new gpt-5.5 enum value to the request property /////

    • breaking

      request body became required

    • breaking

      the request's body type changed from object to no type

    • breaking

      added to the response body oneOf list for the response status

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the request property

    • info

      added request discriminator

    • info

      added to the request body oneOf list

    • info

      added openai anthropic google openai-compatible mapping keys to the response discriminator for the response status

    • info

      removed subschema #1 subschema #2 subschema #3 subschema #4 from the response body oneOf list for the response status