Create an assistant
The persistent configuration: instructions, model, and tools.
Updated on Aug 10, 2026
The assistant stores what you would repeat on every call with agents: the system instruction, the model, and the tools. Changed the instruction? A PATCH updates every future conversation.
https://api.hinow.ai/v1/assistantsBearerCreates a persistent assistant.
Parâmetros
modelstring· bodyobrigatórioThe system instruction.
namestring· bodyAssistant created
descriptionstring· bodyAté 512 caracteres.
instructionsstring· bodyA instrução de sistema. Até 256k caracteres.
toolsarray· bodyfile_search, code_interpreter e/ou function — até 128 ferramentas.
tool_resourcesobject· bodyRecursos das ferramentas, ex.: {"file_search": {"vector_store_ids": ["vs_..."]}}.
temperaturenumber· bodyDefault do modelo se omitido.
top_pnumber· bodyresponse_formatstring | object· bodyauto (default) ou {"type": "json_object"}.
metadataobject· bodyAté 16 pares chave-valor seus.
Respostas
curl -s https://api.hinow.ai/v1/assistants \
-H "Authorization: Bearer hi_SUA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "hinow/himax",
"name": "Analista financeiro",
"instructions": "Você é um analista financeiro. Seja objetivo e cite números.",
"metadata": {"time": "financeiro"}
}'A resposta é o objeto assistant:
{
"id": "asst_da84419c87a84c5db9888d51",
"object": "assistant",
"created_at": 1786359642,
"name": "Analista financeiro",
"model": "hinow/himax",
"instructions": "Você é um analista financeiro. Seja objetivo e cite números.",
"tools": [],
"tool_resources": {},
"metadata": {"time": "financeiro"},
"response_format": "auto"
}# paginação padrão: limit (até 100), order (asc|desc), after, before
curl -s "https://api.hinow.ai/v1/assistants?limit=20&order=desc" \
-H "Authorization: Bearer hi_SUA_API_KEY"curl -s https://api.hinow.ai/v1/assistants/asst_... \
-H "Authorization: Bearer hi_SUA_API_KEY"# POST no mesmo path, só com os campos que mudam
curl -s https://api.hinow.ai/v1/assistants/asst_... \
-H "Authorization: Bearer hi_SUA_API_KEY" \
-H "Content-Type: application/json" \
-d '{"instructions": "Nova instrução — vale para as próximas execuções."}'curl -s -X DELETE https://api.hinow.ai/v1/assistants/asst_... \
-H "Authorization: Bearer hi_SUA_API_KEY"
# → {"id": "asst_...", "object": "assistant.deleted", "deleted": true}Erros no formato OpenAI
Todos os erros da seção voltam como {"error": {"message", "type", "param", "code"}} — o mesmo envelope que os SDKs da OpenAI já sabem interpretar. Um model inexistente, por exemplo: The requested model 'x' does not exist. com type: invalid_request_error.

