Healthcare Innovation

BastionGPT API Now in Public Beta

March 3, 2024
BastionGPT API Now in Public Beta

Overview

The BastionGPT API offers developers access to powerful and HIPAA-compliant BastionGPT Generative AI services. In addition to improved compliance, BastionGPT API exceeds OpenAI ChatGPT (GPT-4) performance for our healthcare and therapy users as it has been expertly developed with those demands in mind. This document outlines the necessary details to integrate with the BastionGPT API, including input parameters, output structure, pricing, limitations, and an example of how to use the API. If you have additional questions about the API, or would like to apply for access, please schedule a time today via https://bastiongpt.com/meet.

API Inputs


Content-Type
: Specifies the media type of the resource. This is typically application/json.

Key: A unique 32-digit alpha-numeric API key provided to users for authentication.

Function: This parameter is used to specify specialty functions. As of the current version, only the "general" function is supported.

Temperature: A floating-point number between 0 and 1 indicating the level of creativity desired in the response. A lower value means less creativity but increased data accuracy.

Content: The actual content or question or prompt you wish to submit to the API.

API-Version: Indicates the version of the API you are using. Format: YYYYMM.

User: This is an optional user-configurable field. It can be used to tag prompts with any string of up to 15 alphanumeric characters. This tag can be used for advanced utilization reports or troubleshooting.

API Outputs


ID
: A unique identifier for the generated prompt.

Created
: A timestamp indicating when the prompt was created.

Model: The model used for the response, which is bastiongpt if model auto-detect is enabled with the "general" function.

Finish_Reason: Indicates the status of the prompt. Normal completion is indicated by stop. A content_filter status means the content was blocked due to detection of suspected unapproved use cases.

Content: The generated response to the submitted prompt.

Prompt_tokens: Number of tokens consumed by the prompt.

Completion_tokens: Number of tokens consumed by the response.

Total_tokens: Total number of tokens consumed by both the prompt and the response.

Environment: This shows the current environment of the API.This is "production" in most cases.

Pricing and Specifications


Monthly Fee
: $200 plus token costs.

Token Costs:
Input tokens: $0.018 per 1,000 tokens.
Output tokens: $0.045 per 1,000 tokens.

Specifications:
Tokens per minute: 10,000.
Requests per minute: 160.
Context limit: 7,850 tokens.
Cache size: 15MB.
Service Level Agreement (SLA): 99.9% uptime.

Available Regions: Southern UK (additional $50/mo), Eastern US, Western US.

Streaming: Currently, streaming of responses is not supported.

Advertised Use Cases: Require prior approval to ensure ethical and compliant use.

API URL & Example Usage

API Endpoint

https://api.bastiongpt.com/pro;rev=2/deployments/bastionapi/chat/completions

HTTP Request Example

POST /pro;rev=2/deployments/bastionapi/chat/completions HTTP/1.1
Host: api.bastiongpt.com
Content-Type: application/json
Key: ab12345678901234567890123456

{
 "messages": [{"role": "user", "content": "What is a normal BP?"}],
 "max_tokens": 1000,
 "temperature": 0,
 "user": "C0001"
}

HTTPS Response Example

{
 "id": "s7RzpHeOFnpM",
 "created": 1709442176,
 "model": "bastiongpt",
 "choices": [
   {
     "finish_reason": "stop",
     "message": {
       "content": "A normal blood pressure (BP) for an adult is generally considered to be in the range of 90/60 mmHg to 120/80 mmHg..."
     }
   }
 ],
 "usage": {
   "prompt_tokens": 30,
   "completion_tokens": 383,
   "total_tokens": 413
 },
 "environment": "development"
}