cicora.ai
API specificationMessages format

Messages API

Use the Messages format for conversations with a top-level system instruction and an explicit output limit.

Integration reference: choose parameters and available capabilities from your account API settings and the model catalogue for your environment.

Compose a message

A request contains model, messages, and max_tokens; the system instruction is sent in a separate system field. Preserve roles and message order so a retry can reproduce context.

Raw HTTP calls https://cicora.ai/api/v1/messages, while a Messages SDK receives only the gateway root https://cicora.ai/api and appends /v1/messages itself.

Messages API request
bash
curl --request POST https://cicora.ai/api/v1/messages \
  --header "Authorization: Bearer $CICORA_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "anthropic/claude-sonnet-5",
    "max_tokens": 500,
    "system": "Answer with a compact checklist.",
    "messages": [{"role": "user", "content": "Prepare a release plan."}]
  }'

Tools and streaming

  • Add tools and tool_choice only for models that support them.
  • Handle streaming mode as an event sequence rather than one JSON object.
  • Confirm the shape of tool arguments before performing an action.

Choose a format

Do not mix fields from two formats in one request. Choose chat or messages at the client boundary and normalize internal history once.

Test migration with a saved de-identified conversation, including a tool result and long context.