Skip to main content
POST
/
api
/
v1
/
gateways
/
{gateway_id}
/
services
{
  "created_at": "<string>",
  "credentials": {
    "api_key": "<string>",
    "aws_access_key_id": "<string>",
    "aws_region": "<string>",
    "aws_role": "<string>",
    "aws_secret_access_key": "<string>",
    "aws_session_token": "<string>",
    "aws_use_role": true,
    "azure_client_id": "<string>",
    "azure_client_secret": "<string>",
    "azure_endpoint": "<string>",
    "azure_eversion": "<string>",
    "azure_tenant_id": "<string>",
    "azure_use_managed_identity": true,
    "gcp_service_account_json": "<string>",
    "gcp_use_service_account": true,
    "header_name": "<string>",
    "header_value": "<string>",
    "param_location": "<string>",
    "param_name": "<string>",
    "param_value": "<string>"
  },
  "description": "<string>",
  "gateway_id": "<string>",
  "headers": {},
  "host": "<string>",
  "id": "<string>",
  "name": "<string>",
  "path": "<string>",
  "port": 123,
  "protocol": "<string>",
  "stream": true,
  "tags": [
    "<string>"
  ],
  "type": "<string>",
  "updated_at": "<string>",
  "upstream": {
    "algorithm": "<string>",
    "created_at": "<string>",
    "embedding_config": {
      "credentials": {
        "api_key": "<string>",
        "aws_access_key_id": "<string>",
        "aws_region": "<string>",
        "aws_role": "<string>",
        "aws_secret_access_key": "<string>",
        "aws_session_token": "<string>",
        "aws_use_role": true,
        "azure_client_id": "<string>",
        "azure_client_secret": "<string>",
        "azure_endpoint": "<string>",
        "azure_eversion": "<string>",
        "azure_tenant_id": "<string>",
        "azure_use_managed_identity": true,
        "gcp_service_account_json": "<string>",
        "gcp_use_service_account": true,
        "header_name": "<string>",
        "header_value": "<string>",
        "param_location": "<string>",
        "param_name": "<string>",
        "param_value": "<string>"
      },
      "model": "<string>",
      "provider": "<string>"
    },
    "gateway_id": "<string>",
    "health_checks": {
      "headers": {},
      "interval": 123,
      "passive": true,
      "path": "<string>",
      "threshold": 123
    },
    "id": "<string>",
    "name": "<string>",
    "proxy": {
      "host": "<string>",
      "port": "<string>",
      "protocol": "<string>"
    },
    "tags": [
      "<string>"
    ],
    "targets": [
      {
        "auth": {
          "oauth": {
            "audience": "<string>",
            "client_id": "<string>",
            "client_secret": "<string>",
            "code": "<string>",
            "code_verifier": "<string>",
            "extra": {},
            "grant_type": "<string>",
            "password": "<string>",
            "redirect_uri": "<string>",
            "refresh_token": "<string>",
            "scopes": [
              "<string>"
            ],
            "token_url": "<string>",
            "use_basic_auth": true,
            "username": "<string>"
          },
          "type": "oauth2"
        },
        "credentials": {
          "api_key": "<string>",
          "aws_access_key_id": "<string>",
          "aws_region": "<string>",
          "aws_role": "<string>",
          "aws_secret_access_key": "<string>",
          "aws_session_token": "<string>",
          "aws_use_role": true,
          "azure_client_id": "<string>",
          "azure_client_secret": "<string>",
          "azure_endpoint": "<string>",
          "azure_eversion": "<string>",
          "azure_tenant_id": "<string>",
          "azure_use_managed_identity": true,
          "gcp_service_account_json": "<string>",
          "gcp_use_service_account": true,
          "header_name": "<string>",
          "header_value": "<string>",
          "param_location": "<string>",
          "param_name": "<string>",
          "param_value": "<string>"
        },
        "default_model": "<string>",
        "description": "<string>",
        "headers": {},
        "host": "<string>",
        "id": "<string>",
        "insecure_ssl": true,
        "models": [
          "<string>"
        ],
        "path": "<string>",
        "port": 123,
        "protocol": "<string>",
        "provider": "<string>",
        "provider_options": {},
        "stream": true,
        "tags": [
          "<string>"
        ],
        "weight": 123
      }
    ],
    "updated_at": "<string>",
    "websocket_config": {
      "enable_direct_communication": true,
      "handshake_timeout": "<string>",
      "ping_period": "<string>",
      "pong_wait": "<string>",
      "read_buffer_size": 123,
      "return_error_details": true,
      "write_buffer_size": 123
    }
  },
  "upstream_id": "<string>"
}

Headers

Authorization
string
required

Authorization token

Path Parameters

gateway_id
string
required

Gateway ID

Body

application/json

Service request body

createdAt
string
credentials
object
description
string
gateway_id
string
headers
object
host
string
id
string
name
string
path
string
port
integer
protocol
string
retries
integer
tags
string[]
type
string
updatedAt
string
upstream_id
string

Response

Service created successfully

created_at
string
credentials
object
description
string
gateway_id
string
headers
object
host
string

Direct configuration (used when type is "direct")

id
string
name
string
path
string
port
integer
protocol
string
stream
boolean

Common settings

tags
string[]
type
string

"upstream" or "endpoint"

updated_at
string
upstream
object
upstream_id
string

Upstream configuration (used when type is "upstream")

I