Skip to main content
POST
/
chat
/
completions
Python (OpenAI SDK)
from openai import OpenAI

client = OpenAI(
    api_key="your-api-key",
    base_url="https://api.subconscious.dev/v1",
)

response = client.chat.completions.create(
    model="subconscious/tim-qwen3.6-27b",
    messages=[{"role": "user", "content": "What is the capital of France?"}],
)

print(response.choices[0].message.content)
{
  "id": "chatcmpl-abc123",
  "created": 1716000000,
  "model": "subconscious/tim-qwen3.6-27b",
  "choices": [
    {
      "index": 123,
      "message": {
        "content": "<string>"
      }
    }
  ],
  "usage": {
    "prompt_tokens": 123,
    "completion_tokens": 123,
    "total_tokens": 123
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.subconscious.dev/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

API key from your Subconscious dashboard

Body

application/json
model
enum<string>
required

The model to use for completion.

Available options:
subconscious/tim-qwen3.6-27b
Example:

"subconscious/tim-qwen3.6-27b"

messages
object[]
required

The conversation history. Each message has a role and content.

Example:
[
{
"role": "user",
"content": "What is the capital of France?"
}
]
stream
boolean
default:false

If true, responses are streamed as Server-Sent Events. Each event is a ChatCompletionChunk object. The stream ends with data: [DONE].

max_tokens
integer

Maximum number of tokens to generate in the response.

max_completion_tokens
integer

An alternative to max_tokens. Maximum number of tokens to generate.

temperature
number

Sampling temperature between 0 and 2. Lower values make output more focused and deterministic, while higher values make it more creative.

Required range: 0 <= x <= 2
top_p
number

Nucleus sampling parameter. Only considers tokens whose cumulative probability exceeds this threshold.

Required range: 0 <= x <= 1
frequency_penalty
number

Penalizes tokens based on their frequency in the text so far.

Required range: -2 <= x <= 2
presence_penalty
number

Penalizes tokens based on whether they appear in the text so far.

Required range: -2 <= x <= 2
stop

Up to 4 sequences where the model will stop generating.

response_format
object

Constrains the response format. Use {"type": "json_object"} for valid JSON or {"type": "json_schema", "json_schema": {...}} for schema-constrained output.

stream_options
object

Options for streaming responses.

chat_template_kwargs
object

Subconscious extension. Controls model-specific features like thinking mode.

Response

Successful completion

id
string

A unique identifier for the completion.

Example:

"chatcmpl-abc123"

object
enum<string>

The object type.

Available options:
chat.completion
created
integer

Unix timestamp of when the completion was created.

Example:

1716000000

model
string

The model used for the completion.

Example:

"subconscious/tim-qwen3.6-27b"

choices
object[]
usage
object