POST
/
v1
/
chat
/
completions
Chat Completion
curl --request POST \
  --url https://api.charactergateway.com/v1/chat/completions \
  --header 'Content-Type: application/json' \
  --header 'authorization: <authorization>' \
  --data '{
  "model": "c:kate>m:google/gemini-2.0-flash-001",
  "messages": [
    {
      "role": "user",
      "content": "Hello, how are you?"
    }
  ],
  "stream": false,
  "temperature": 1,
  "max_tokens": 1000
}'
{
  "id": "chatcmpl-123",
  "object": "chat.completion",
  "created": 1677652288,
  "model": "c:kate>m:google/gemini-2.0-flash-001",
  "choices": [
    {
      "index": 123,
      "message": {
        "role": "user",
        "content": "Hello, how are you?"
      },
      "finish_reason": "<string>"
    }
  ],
  "usage": {
    "prompt_tokens": 123,
    "completion_tokens": 123,
    "total_tokens": 123
  },
  "resources": [
    "<string>"
  ]
}

Headers

authorization
string
required

API key for authentication

Example:

"Bearer sk-..."

Body

application/json
model
string
required

Model identifier with optional character and scenario slugs

Example:

"c:kate>m:google/gemini-2.0-flash-001"

messages
object[]
required
Example:
[
{
"role": "user",
"content": "Hello, how are you?"
}
]
stream
boolean

Whether to stream the response

Example:

false

temperature
number

Sampling temperature

Example:

1

max_tokens
number

Maximum tokens to generate

Example:

1000

Response

Successful completion response

id
string
required
Example:

"chatcmpl-123"

object
enum<string>
required
Available options:
chat.completion
Example:

"chat.completion"

created
number
required
Example:

1677652288

model
string
required
Example:

"c:kate>m:google/gemini-2.0-flash-001"

choices
object[]
required
usage
object
required
resources
string[]