Providers

Add a new provider

Adds a new provider with the specified configuration.

POST
/api/providers
AuthorizationBearer <token>

Bearer token authentication. Use your MPilot virtual-key JWT or admin JWT. Virtual keys (prefixed with sk-bf-) can also be passed here.

In: header

providerModelProvider

AI model provider identifier

Value in"openai" | "azure" | "anthropic" | "bedrock" | "cohere" | "vertex" | "vllm" | "mistral" | "ollama" | "groq" | "sgl" | "parasail" | "perplexity" | "replicate" | "cerebras" | "gemini" | "openrouter" | "elevenlabs" | "huggingface" | "nebius" | "xai" | "runway" | "fireworks"
network_config?NetworkConfig

Network configuration for provider connections

concurrency_and_buffer_size?ConcurrencyAndBufferSize

Concurrency settings

proxy_config?object

Proxy configuration

send_back_raw_request?boolean
send_back_raw_response?boolean
store_raw_request_response?boolean
custom_provider_config?object

Custom provider configuration

Response Body

curl -X POST "https://loading/{AI_GATEWAY_URL}/api/providers" \  -H "Content-Type: application/json" \  -d '{    "provider": "openai"  }'
{
  "name": "openai",
  "network_config": {
    "base_url": "string",
    "extra_headers": {
      "property1": "string",
      "property2": "string"
    },
    "default_request_timeout_in_seconds": 0,
    "max_retries": 0,
    "retry_backoff_initial": 0,
    "retry_backoff_max": 0,
    "insecure_skip_verify": true,
    "ca_cert_pem": "string"
  },
  "concurrency_and_buffer_size": {
    "concurrency": 0,
    "buffer_size": 0
  },
  "proxy_config": {
    "type": "none",
    "url": "string",
    "username": "string",
    "password": "string",
    "ca_cert_pem": "string"
  },
  "send_back_raw_request": true,
  "send_back_raw_response": true,
  "store_raw_request_response": true,
  "custom_provider_config": {
    "is_key_less": true,
    "base_provider_type": "openai",
    "allowed_requests": {
      "list_models": true,
      "text_completion": true,
      "text_completion_stream": true,
      "chat_completion": true,
      "chat_completion_stream": true,
      "responses": true,
      "responses_stream": true,
      "count_tokens": true,
      "embedding": true,
      "speech": true,
      "speech_stream": true,
      "transcription": true,
      "transcription_stream": true,
      "image_generation": true,
      "image_generation_stream": true,
      "batch_create": true,
      "batch_list": true,
      "batch_retrieve": true,
      "batch_cancel": true,
      "batch_results": true,
      "file_upload": true,
      "file_list": true,
      "file_retrieve": true,
      "file_delete": true,
      "file_content": true
    },
    "request_path_overrides": {
      "property1": "string",
      "property2": "string"
    }
  },
  "provider_status": "active",
  "status": "string",
  "description": "string",
  "config_hash": "string"
}
{
  "event_id": "string",
  "type": "string",
  "is_bifrost_error": true,
  "status_code": 0,
  "error": {
    "type": "string",
    "code": "string",
    "message": "string",
    "param": "string",
    "event_id": "string"
  },
  "extra_fields": {
    "provider": "openai",
    "model_requested": "string",
    "request_type": "string"
  }
}
{
  "event_id": "string",
  "type": "string",
  "is_bifrost_error": true,
  "status_code": 0,
  "error": {
    "type": "string",
    "code": "string",
    "message": "string",
    "param": "string",
    "event_id": "string"
  },
  "extra_fields": {
    "provider": "openai",
    "model_requested": "string",
    "request_type": "string"
  }
}
{
  "event_id": "string",
  "type": "string",
  "is_bifrost_error": true,
  "status_code": 0,
  "error": {
    "type": "string",
    "code": "string",
    "message": "string",
    "param": "string",
    "event_id": "string"
  },
  "extra_fields": {
    "provider": "openai",
    "model_requested": "string",
    "request_type": "string"
  }
}
On this page

On this page

No Headings