File size: 1,427 Bytes
f16d50c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
### login
POST {{baseUrl}}/platform/login
Content-Type: application/json

{
  "username": "{{username}}",
  "password": "{{password}}"
}

### get models
GET {{baseUrl}}/platform/v1/models
Authorization: Bearer {{apiKey}}

### get model
GET {{baseUrl}}/platform/v1/models/gpt-3.5-turbo-16k-0613
Authorization: Bearer {{apiKey}}

### Create chat completion
POST {{baseUrl}}/platform/v1/chat/completions
Content-Type: application/json
Authorization: Bearer {{apiKey}}

{
  "model": "gpt-3.5-turbo",
  "messages": [
    {
      "role": "system",
      "content": "You are a helpful assistant."
    },
    {
      "role": "user",
      "content": "Hello!"
    }
  ],
  "stream": true
}

### Create completion
POST {{baseUrl}}/platform/v1/completions
Content-Type: application/json
Authorization: Bearer {{apiKey}}

{
  "model": "text-davinci-003",
  "prompt": "Say this is a test",
  "max_tokens": 7,
  "temperature": 0,
  "stream": true
}

### get user api_keys
GET {{baseUrl}}/platform/dashboard/user/api_keys
Authorization: Bearer {{apiKey}}

### get billing credit_grants
GET {{baseUrl}}/platform/dashboard/billing/credit_grants
Authorization: Bearer {{apiKey}}

### get billing subscription
GET {{baseUrl}}/platform/dashboard/billing/subscription
Authorization: Bearer {{apiKey}}

### get billing usage
GET {{baseUrl}}/platform/dashboard/billing/usage?end_date=2023-07-01&start_date=2023-06-01
Authorization: Bearer {{apiKey}}