Skip to content

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.

POSThttps://api.hinow.ai/v1/assistantsBearer

Creates a persistent assistant.

Parâmetros

  • modelstring· bodyobrigatório

    The system instruction.

  • namestring· body

    Assistant created

  • descriptionstring· body

    Até 512 caracteres.

  • instructionsstring· body

    A instrução de sistema. Até 256k caracteres.

  • toolsarray· body

    file_search, code_interpreter e/ou function — até 128 ferramentas.

  • tool_resourcesobject· body

    Recursos das ferramentas, ex.: {"file_search": {"vector_store_ids": ["vs_..."]}}.

  • temperaturenumber· body

    Default do modelo se omitido.

  • top_pnumber· body
  • response_formatstring | object· body

    auto (default) ou {"type": "json_object"}.

  • metadataobject· body

    Até 16 pares chave-valor seus.

Respostas

200O objeto assistant criado
400Parâmetro inválido — model ausente ou desconhecido, tool de tipo inválido
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"
}

Listar, ler, editar e remover

# 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"

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.

Was this page helpful?