Felo API PlatformFelo API Platform
v0.4.0
OpenAPI 3.1.0

Submit structured decisions

服务器:https://openapi.felo.ai
客户端库

Submit structured decisions

​

Non-streaming state/questions request; answers retain the Decisions shape.

请求头
  • X-Felo-Channel
    类型: string

    Ordered comma-separated public channel codes. Omit this header to use default; default must be used alone. In wallet mode, default scans the model's effective public channel order in reverse, skips unpublished or unavailable channels, and selects the first available channel's provider. It includes available endpoints from that provider with the same upstream model ID and service tier. Explicit channels are validated in client-specified order; only the first channel's provider group is submitted. No automatic fallback to other providers. Legacy provider headers cannot override channel routing.

请求体·DecisionsRequest
必填
application/json

Non-streaming Decisions; question definitions pass through unchanged.

  • model
    类型: string
    必填
  • questions
    类型: object
    必填
    • propertyName
      类型: object
  • state
    必填
  • service_tier
    类型: string | null

    Currently only default (standard) is supported. Omitted, null, aliases and unsupported strings fallback to default; other types return HTTP 400. Configured channels and prices remain unchanged. Text APIs send the provider's standard value; Decisions and generation APIs omit the upstream field.

  • stream
    类型: const
    常量:  
    false
  • propertyName
    类型: anything
响应
  • 200
    类型: object · DecisionsResponse

    Decision answers

    • answers
      类型: object
      • propertyName
        类型: anything
    • id
      类型: string
    • usage
      类型: object
      • propertyName
        类型: anything
    • propertyName
      类型: anything
    application/json
  • 400
    类型: object · DecisionsErrorResponse

    Request rejected or upstream unavailable

    • error
      类型: object
      必填
      • code
        类型: integer
        必填

        Integer numbers.

      • message
        类型: string
        必填
    application/json
  • 401
    类型: object · DecisionsErrorResponse

    Request rejected or upstream unavailable

    • error
      类型: object
      必填
      • code
        类型: integer
        必填

        Integer numbers.

      • message
        类型: string
        必填
    application/json
  • 402
    类型: object · DecisionsErrorResponse

    Request rejected or upstream unavailable

    • error
      类型: object
      必填
      • code
        类型: integer
        必填

        Integer numbers.

      • message
        类型: string
        必填
    application/json
  • 403
    类型: object · DecisionsErrorResponse

    Request rejected or upstream unavailable

    • error
      类型: object
      必填
      • code
        类型: integer
        必填

        Integer numbers.

      • message
        类型: string
        必填
    application/json
  • 429
    类型: object · DecisionsErrorResponse

    Request rejected or upstream unavailable

    • error
      类型: object
      必填
      • code
        类型: integer
        必填

        Integer numbers.

      • message
        类型: string
        必填
    application/json
  • 502
    类型: object · DecisionsErrorResponse

    Request rejected or upstream unavailable

    • error
      类型: object
      必填
      • code
        类型: integer
        必填

        Integer numbers.

      • message
        类型: string
        必填
    application/json
  • 503
    类型: object · DecisionsErrorResponse

    Request rejected or upstream unavailable

    • error
      类型: object
      必填
      • code
        类型: integer
        必填

        Integer numbers.

      • message
        类型: string
        必填
    application/json
Request Example for post/api/v1/decisions
curl https://openapi.felo.ai/api/v1/decisions \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "model": "configured-decisions-model",
  "state": "A payout failed.",
  "questions": {
    "urgent": {
      "type": "noul",
      "instructions": "Is it urgent?",
      "criteria": {
        "true": "Urgent",
        "false": "No"
      }
    }
  }
}'
{
  "id": "string",
  "answers": {
    "additionalProperty": "anything"
  },
  "usage": {
    "additionalProperty": "anything"
  },
  "additionalProperty": "anything"
}
Submit structured decisions