Felo API PlatformFelo API Platform
v0.3.0
OpenAPI 3.1.0

Create a chat completion

Server:https://openapi.felo.ai
Client Libraries

Create a chat completion

​

OpenAI-compatible Chat Completions API. Set stream=true to receive Server-Sent Events. The response and error envelope follow the Chat Completions/OpenAI-compatible shape.

Body·ChatCompletionRequest
required
application/json
  • messages
    Type: array object[] · ChatMessage[] 1…
    required
    • content
      nullable
      required
      • Type: string
    • role
      Type: string enum
      required
      values
      • system
      • developer
      • user
      • assistant
      • tool
    • name
      Type: string
    • tool_call_id
      Type: string
    • tool_calls
      Type: array object[]
      • propertyName
        Type: anything
    • propertyName
      Type: anything
  • model
    Type: string
    required
  • max_completion_tokens
    Type: integer
    min:  
    1

    Integer numbers.

  • max_tokens
    Type: integer
    min:  
    1

    Integer numbers.

  • n
    Type: integer
    min:  
    1

    Integer numbers.

  • response_format
    Type: object
    • propertyName
      Type: anything
  • stop
    nullable
    • Type: string
  • stream
    Type: boolean
  • temperature
    Type: number
    min:  
    0
  • tool_choice
    • Type: string
  • tools
    Type: array object[]
    • propertyName
      Type: anything
  • top_p
    Type: number
    min:  
    0
    max:  
    1
  • propertyName
    Type: anything
  • user
    Type: string
  • propertyName
    Type: anything
Responses
  • 200
    Type: object · ChatCompletionResponse

    Chat completion or streaming response

    • choices
      Type: array object[] · ChatChoice[]
      required
      • finish_reason
        Type: string | null
      • index
        Type: integer

        Integer numbers.

      • logprobs
        Type: object | null
        • propertyName
          Type: anything
      • message
        Type: object · ChatMessage
        • content
          nullable
          required
          • Type: string
        • role
          Type: string enum
          required
          values
          • system
          • developer
          • user
          • assistant
          • tool
        • name
          Type: string
        • tool_call_id
          Type: string
        • tool_calls
          Type: array object[]
          • propertyName
            Type: anything
        • propertyName
          Type: anything
      • propertyName
        Type: anything
    • id
      Type: string
      required
    • object
      Type: string
      required

      Usually chat.completion for non-streaming responses.

    • created
      Type: integer Format: int64

      Signed 64-bit integers (long type).

    • model
      Type: string
    • system_fingerprint
      Type: string
    • usage
      Type: object · Usage

      Provider usage object. Fields vary by endpoint and provider.

      • propertyName
        Type: anything
    • propertyName
      Type: anything
  • 400
    Type: object · OpenAIErrorResponse

    Invalid request, model, or provider mapping

    OpenAI-compatible error envelope. The Router may include code and message without all optional upstream fields.

    • error
      Type: object
      required
      • message
        Type: string
        required
      • code
        Type: string | null
      • param
        Type: string | null
      • type
        Type: string

        OpenAI-compatible error type when supplied.

      • propertyName
        Type: anything
    • propertyName
      Type: anything
    application/json
  • 401
    Type: object · OpenAIErrorResponse

    Invalid or missing Felo API key

    OpenAI-compatible error envelope. The Router may include code and message without all optional upstream fields.

    • error
      Type: object
      required
      • message
        Type: string
        required
      • code
        Type: string | null
      • param
        Type: string | null
      • type
        Type: string

        OpenAI-compatible error type when supplied.

      • propertyName
        Type: anything
    • propertyName
      Type: anything
    application/json
  • 402
    Type: object · OpenAIErrorResponse

    Insufficient balance

    OpenAI-compatible error envelope. The Router may include code and message without all optional upstream fields.

    • error
      Type: object
      required
      • message
        Type: string
        required
      • code
        Type: string | null
      • param
        Type: string | null
      • type
        Type: string

        OpenAI-compatible error type when supplied.

      • propertyName
        Type: anything
    • propertyName
      Type: anything
    application/json
  • 403
    Type: object · OpenAIErrorResponse

    Account is not permitted to use the model. Disabled models are also rejected before upstream calls. Existing accepted requests and tasks continue.

    OpenAI-compatible error envelope. The Router may include code and message without all optional upstream fields.

    • error
      Type: object
      required
      • message
        Type: string
        required
      • code
        Type: string | null
      • param
        Type: string | null
      • type
        Type: string

        OpenAI-compatible error type when supplied.

      • propertyName
        Type: anything
    • propertyName
      Type: anything
    application/json
  • 429
    Type: object · OpenAIErrorResponse

    Spending or request limit reached

    OpenAI-compatible error envelope. The Router may include code and message without all optional upstream fields.

    • error
      Type: object
      required
      • message
        Type: string
        required
      • code
        Type: string | null
      • param
        Type: string | null
      • type
        Type: string

        OpenAI-compatible error type when supplied.

      • propertyName
        Type: anything
    • propertyName
      Type: anything
    application/json
  • 502
    Type: object · OpenAIErrorResponse

    Upstream provider request failed

    OpenAI-compatible error envelope. The Router may include code and message without all optional upstream fields.

    • error
      Type: object
      required
      • message
        Type: string
        required
      • code
        Type: string | null
      • param
        Type: string | null
      • type
        Type: string

        OpenAI-compatible error type when supplied.

      • propertyName
        Type: anything
    • propertyName
      Type: anything
    application/json
  • 503
    Type: object · OpenAIErrorResponse

    Provider or billing service unavailable

    OpenAI-compatible error envelope. The Router may include code and message without all optional upstream fields.

    • error
      Type: object
      required
      • message
        Type: string
        required
      • code
        Type: string | null
      • param
        Type: string | null
      • type
        Type: string

        OpenAI-compatible error type when supplied.

      • propertyName
        Type: anything
    • propertyName
      Type: anything
    application/json
Request Example for post/api/v1/chat/completions
curl https://openapi.felo.ai/api/v1/chat/completions \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "model": "gpt-5.5",
  "messages": [
    {
      "role": "user",
      "content": "Write a one-sentence greeting."
    }
  ],
  "stream": false
}'
{
  "id": "string",
  "object": "string",
  "created": 1,
  "model": "string",
  "choices": [
    {
      "index": 1,
      "message": {
        "role": "system",
        "content": "string",
        "name": "string",
        "tool_call_id": "string",
        "tool_calls": [
          {
            "additionalProperty": "anything"
          }
        ],
        "additionalProperty": "anything"
      },
      "finish_reason": null,
      "logprobs": null,
      "additionalProperty": "anything"
    }
  ],
  "usage": {
    "additionalProperty": "anything"
  },
  "system_fingerprint": "string",
  "additionalProperty": "anything"
}
Create a chat completion