curl -X POST "$ATAI_API_ENDPOINT/inference/responses" \
-H "Authorization: Bearer $ATAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "newton-fusion-1.0",
"instructions": "You are a safety inspector.",
"input": "List three checks to run before starting a conveyor belt."
}'
import os
from openai import OpenAI
client = OpenAI(
base_url=f"{os.environ['ATAI_API_ENDPOINT']}/inference",
api_key=os.environ["ATAI_API_KEY"],
)
response = client.responses.create(
model="newton-fusion-1.0",
instructions="You are a safety inspector.",
input="List three checks to run before starting a conveyor belt.",
)
print(response.output_text)
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: `${process.env.ATAI_API_ENDPOINT}/inference`,
apiKey: process.env.ATAI_API_KEY
});
const response = await client.responses.create({
model: 'newton-fusion-1.0',
instructions: 'You are a safety inspector.',
input: 'List three checks to run before starting a conveyor belt.'
});
console.log(response.output_text);
{
"errors": [
{
"code": "bad_request",
"message": "model 'newton-omega-1.5' does not serve Responses; this agent answers: /api/inference/query",
"suggestion": null,
"error_uid": "err-xxxxxxxx"
}
]
}
{
"errors": [
{
"code": "not_found",
"message": "model 'newton-c-9' is not available",
"suggestion": null,
"error_uid": "err-xxxxxxxx"
}
]
}
Inference API
Inference: Responses
Query a platform-hosted model with an OpenAI Responses request
POST
/
api
/
inference
/
responses
curl -X POST "$ATAI_API_ENDPOINT/inference/responses" \
-H "Authorization: Bearer $ATAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "newton-fusion-1.0",
"instructions": "You are a safety inspector.",
"input": "List three checks to run before starting a conveyor belt."
}'
import os
from openai import OpenAI
client = OpenAI(
base_url=f"{os.environ['ATAI_API_ENDPOINT']}/inference",
api_key=os.environ["ATAI_API_KEY"],
)
response = client.responses.create(
model="newton-fusion-1.0",
instructions="You are a safety inspector.",
input="List three checks to run before starting a conveyor belt.",
)
print(response.output_text)
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: `${process.env.ATAI_API_ENDPOINT}/inference`,
apiKey: process.env.ATAI_API_KEY
});
const response = await client.responses.create({
model: 'newton-fusion-1.0',
instructions: 'You are a safety inspector.',
input: 'List three checks to run before starting a conveyor belt.'
});
console.log(response.output_text);
{
"errors": [
{
"code": "bad_request",
"message": "model 'newton-omega-1.5' does not serve Responses; this agent answers: /api/inference/query",
"suggestion": null,
"error_uid": "err-xxxxxxxx"
}
]
}
{
"errors": [
{
"code": "not_found",
"message": "model 'newton-c-9' is not available",
"suggestion": null,
"error_uid": "err-xxxxxxxx"
}
]
}
Requires version 2.0.1 or later of the Archetype platform.
Overview
This endpoint takes an OpenAI Responses request and sends it to a model that the Archetype Platform hosts.model names one of the
available models that serves Responses:
newton-c-2.6 or newton-fusion-1.0. The platform forwards the body to a running copy of that
model and returns its response object unchanged.
You can call it with an OpenAI SDK by setting the base URL to
https://platform.u1.archetypeai.app/api/inference and the API key to your Archetype API key.
Request
Name of the model to query:
newton-c-2.6 or newton-fusion-1.0. A model that doesn’t serve
Responses, such as omega-embedding, returns 400. An unknown name returns 404.The conversation: a string, or a list of messages. A message’s
content is a string or a list
of parts: input_text, input_image, input_video, and input_audio. To
continue a conversation, append the previous response’s output to input.
Send images and video inline as data: URIs, in a request body under 2 MiB; every image and
video frame is resized to 224 × 224 pixels. See Current
Limitations.Must be
false or omitted. Streaming isn’t supported yet, and true returns 400.Options that need stored state or features the model doesn’t have return
400:
previous_response_id, conversation, reasoning, a text format other than plain text,
non-empty tools, a tool_choice other than none or auto, non-empty include, a
truncation other than disabled, a non-zero top_logprobs, background: true, prompt,
max_tool_calls, non-empty context_management, moderation, and non-empty metadata. Their
OpenAI defaults are accepted, so an SDK that sends every field still works.Notes for OpenAI SDK Users
- Newton Fusion 1.0’s reasoning arrives in the answer. The text starts with a
<think>...</think>block, empty when the model answered directly; remove it before showing the answer.reasoningis refused. To answer without reasoning, end the user text with/no_think: it works when the request includes an image or video, and on a text-only request the model reasons anyway. See Reasoning. repetition_penaltyis ignored here. It isn’t an OpenAI field; sent through the SDK (for example inextra_body), it’s accepted and has no effect. If the model repeats itself in long lists, send the request to/inference/query, which applies it.- Media go inline. Send images and video as
data:URIs; uploaded files can’t be referenced. - A query stops after about 60 seconds and returns
504. Keep answers short with the token limit and the prompt; see Choosing an Endpoint.
Response
The model’s response object. The OpenAI SDKs expose the answer text asoutput_text.
curl -X POST "$ATAI_API_ENDPOINT/inference/responses" \
-H "Authorization: Bearer $ATAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "newton-fusion-1.0",
"instructions": "You are a safety inspector.",
"input": "List three checks to run before starting a conveyor belt."
}'
import os
from openai import OpenAI
client = OpenAI(
base_url=f"{os.environ['ATAI_API_ENDPOINT']}/inference",
api_key=os.environ["ATAI_API_KEY"],
)
response = client.responses.create(
model="newton-fusion-1.0",
instructions="You are a safety inspector.",
input="List three checks to run before starting a conveyor belt.",
)
print(response.output_text)
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: `${process.env.ATAI_API_ENDPOINT}/inference`,
apiKey: process.env.ATAI_API_KEY
});
const response = await client.responses.create({
model: 'newton-fusion-1.0',
instructions: 'You are a safety inspector.',
input: 'List three checks to run before starting a conveyor belt.'
});
console.log(response.output_text);
{
"errors": [
{
"code": "bad_request",
"message": "model 'newton-omega-1.5' does not serve Responses; this agent answers: /api/inference/query",
"suggestion": null,
"error_uid": "err-xxxxxxxx"
}
]
}
{
"errors": [
{
"code": "not_found",
"message": "model 'newton-c-9' is not available",
"suggestion": null,
"error_uid": "err-xxxxxxxx"
}
]
}
Important Notes
- Every error is listed in Errors on the Inference API overview.
- Errors use the Archetype error envelope, not OpenAI’s. An OpenAI SDK raises them as API errors with the HTTP status.
400withmodel '<model>' refused this requestmeans the model rejected the body, for example because it sets one of the unsupported options above.
Was this page helpful?