post__ai_llm

⚠️ TEST ENVIRONMENT ONLY

This API endpoint is currently available only in the TEST environment. It is not yet available in production.

POST /ai/llm

Create AI LLM Configuration

Create a new AI/LLM provider configuration for your workspace. This endpoint allows you to configure connections to various AI and Large Language Model providers.

Supported AI Providers:

  • OPENAI: OpenAI (GPT-4, GPT-3.5, etc.)

  • GOOGLE: Google AI (Gemini, PaLM, etc.)

  • ANTHROPIC: Anthropic (Claude models)

  • AWS: Amazon Bedrock and AWS AI services

  • OTHER: Custom or other AI providers

Key Features:

  • Centralized AI provider credential management

  • Support for multiple AI providers per workspace

  • Encrypted storage of API keys and secrets

  • Integration with Flashback repositories for AI-powered features

Security:

  • API keys and secrets are encrypted before storage

  • Credentials are never returned in API responses (only masked values)

  • Workspace-level access controls apply

Validation:

  • Configuration name must be unique within your workspace

  • Endpoint URL format is validated

  • Credentials can be validated after creation using the validate endpoint

TypeScript Client Library

public createAiLlm = async (data: CreateAiLlmRequest): Promise<CreateAiLlmResponse> => {
  return this.makeRequest<CreateAiLlmResponse>('ai/llm', 'POST', data);
};

Code Samples

# You can also use wget
curl -X POST https://backend.flashback.tech/ai/llm \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

Body parameter

{
  "name": "My OpenAI Config",
  "aiType": "OPENAI",
  "endpoint": "https://api.openai.com/v1",
  "key": "optional-access-key",
  "secret": "sk-proj-xxxxxxxxxxxx",
  "workspaceId": "workspace-123"
}

Parameters

Name
In
Type
Required
Description

body

body

object

true

none

» name

body

string

true

Human-readable name for the AI LLM configuration

» aiType

body

string

true

Type of AI provider

» endpoint

body

string

true

API endpoint URL for the AI provider

» key

body

string

false

Access key or API key (optional, provider-dependent)

» secret

body

string

true

Secret key or API secret for authentication

» workspaceId

body

string

true

Workspace ID this configuration belongs to

Enumerated Values

Parameter
Value

» aiType

OPENAI

» aiType

GOOGLE

» aiType

ANTHROPIC

» aiType

AWS

» aiType

OTHER

Example responses

200 Response

{
  "success": true,
  "aiLlmId": "550e8400-e29b-41d4-a716-446655440000",
  "message": "AI LLM configuration created successfully"
}

Responses

Status
Meaning
Description
Schema

200

AI LLM configuration created successfully

Inline

400

Validation error or invalid parameters

Inline

403

Insufficient permissions

Inline

500

Failed to create configuration

Inline

Response Schema

Status Code 200

Name
Type
Required
Restrictions
Description

» success

boolean

false

none

Operation success status

» aiLlmId

string

false

none

Unique identifier for the created AI LLM config

» message

string

false

none

Success message

Status Code 400

Name
Type
Required
Restrictions
Description

» success

boolean

false

none

none

» message

string

false

none

none

Status Code 403

Name
Type
Required
Restrictions
Description

» success

boolean

false

none

none

» message

string

false

none

none

Status Code 500

Name
Type
Required
Restrictions
Description

» success

boolean

false

none

none

» message

string

false

none

none

To perform this operation, you must be authenticated by means of one of the following methods: BearerAuth

Last updated

Was this helpful?