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.
For the most up-to-date API documentation and the latest feature releases, please visit our API documentation portal at https://bastiongpt.com/api-signup
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 Access Charge:
60-day trial, including $20 in credits
Afterwards, $100 per month, which includes $50 of token credits each month.
Utilization Costs:
Input tokens: $0.018 per 1,000 tokens (approximately 770 words).
Output tokens: $0.045 per 1,000 tokens (approximately 770 words).
Speech-to-Text Conversion: $0.73 per hour of audio.
Specifications:
Tokens per minute: 400,000.
Requests per minute: 1,500.
Context limit: 500,000 tokens.
Service Level Agreement (SLA): 99.9% uptime.
Direct ingestion of files other than text or audio is not supported.
Ingestion of images for text recognition will be offered Q3 2025.
Available Regions:
United States
Canada (Quebec)
Australia
Allowed Use Cases:
Prior to generation of API keys, approval is required to ensure ethical and compliant use.
Available Regions:
United States
Canada (Quebec)
Australia
Allowed Use Cases:
Prior to generation of API keys, approval is required to ensure ethical and compliant use.
Security Information
We prioritize the security and integrity of your data. Our API infrastructure is built with robust security measures, ensuring your interactions are protected using industry best practices. Here's how we safeguard your connections:
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"
}
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article