Context
  1. API Docs
Context
  • FaceTo-AI Tool Docs
    • Getting Started
    • Server APIs
    • Security
    • About ChatAPI
    • API Docs
      • Get FaceTo-AI Room Link
        POST
  1. API Docs

Get FaceTo-AI Room Link

POST
/v1/room/link

Description#

The entry link used to get the video communication.Through this link, you can video communicate with the AI and ask any question you want to communicate.

Note#

Please read the current document carefully and get the return value by POST. Of course, the Authorization Token in the HTTP Header is required.

Authorization Token#

If necessary, please contact me via email and tell me your purpose. I will give you feedback in time and provide you with a testable token. Please keep it confidential. Our email is panohire@gmail.com
Subject
Applying for FaceTo-AI AuthToken
Body
{If convenient, please describe your use.}

About ChatAPI#

FaceTo-AI already automatically links to ChatGPT. The model uses gpt-3.5-turb, so you can use it directly. Of course, if you have a custom ChatAPI, you can pass it to us with parameters and develop it according to our interface specification, so you can customize the ChatGPT interface.
The ChatAPI interface design document is available at:About ChatAPI

HTTP response status codes for API#

Status codeDescription
200OK
400Bad Request
401Auth Error
403Forbidden
404Not Found
500Internal Server Error
503Service unavailable

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Body Params application/json
chatapi
object 
optional
ChatAPI Config
api
string 
required
You can customize the chatapi interface. For details, see About ChatAPI above.If you do not implement the interface, this parameter can be passed without, or with an empty string
key
string 
required
The auth key required by chatapi.If it is set, we will put it in the Authorization Bearer in the Http Header when calling chatapi. like as Authorization Bearer {key}
config
object 
optional
Some custom configurations about the video room.These configurations allow for more variety in your video communication, which is a wonderful thing.
duration
integer 
optional
This parameter controls the maximum duration of the current video communication, in seconds. The maximum duration is 600 (10 minutes), Minimum value 180 (3 minutes).
eg:300,Video communication will be limited to five minutes.
greeting
string 
optional
You can customize the greeting of the AI robot. If it is not set, we will automatically reply to the universal greeting.
voice_id
string 
optional
AI voice can be assigned
username
string 
optional
AI Username Set
botname
string 
optional
AI Bot Name Set
webhook
object 
optional
Webhook Config
api
string 
required
When you set up the webhook api, we will push relevant data to you after the room ends the call, such as chat messages, voice, and video data.
key
string 
required
The auth key required by webhook api.If it is set, we will put it in the Authorization Bearer in the Http Header when calling webhook api. like as Authorization Bearer {key}
prompt
object 
optional
Prompt Config
role
string 
optional
ChatGPT role name
question
array[string]
optional
AI Ask Question List
Example
{
    "config": {
        "duration": 600,
        "greeting": "hello",
        "voice_id": ""
    },
    "chatapi":{
        "key": "01H2ATQD9RJZNYTN8MG8D6PWZ4",
        "api": "https://{{yourhostname}}/v1/chat/completions"
    }
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://faceto-ai.withcontext.ai/v1/room/link' \
--header 'Content-Type: application/json' \
--data-raw '{
    "config": {
        "duration": 600,
        "greeting": "hello",
        "voice_id": ""
    },
    "chatapi":{
        "key": "01H2ATQD9RJZNYTN8MG8D6PWZ4",
        "api": "https://{{yourhostname}}/v1/chat/completions"
    }
}'

Responses

🟢200Success
application/json
Body
token
string 
required
token of the service association
link
string 
required
link
Example
{
    "token": "01H1ASWBWXDVBYKW9B7F9CT974",
    "name": "5p65-pqvp",
    "link": "https://{hostname}/rooms/5p65-pqvp"
}
🟠400Bad Request
🟠401Auth Not Allow
🟠403Auth Forbidden
🔴500Internal Server Error
Modified at 2023-08-15 09:36:41
Previous
About ChatAPI
Built with