Felo API PlatformFelo API Platform
v0.4.0
OpenAPI 3.1.0

Creare una risposta del modello

Server:https://openapi.felo.ai
Librerie client

Creare una risposta del modello

​

Endpoint compatibile con l'API OpenAI Responses. Una risposta non in streaming riuscita usa la struttura dell'oggetto Responses; con stream=true l'endpoint restituisce eventi SSE Responses. Un oggetto Responses non riuscito può usare status=failed con error={code,message} anche quando la richiesta HTTP è stata completata.

Intestazioni
  • X-Felo-Channel
    Tipo: string

    Codici canale pubblici separati da virgola e in ordine. Omettere questa intestazione per usare default; default deve essere usato da solo. In modalità wallet, default analizza in ordine inverso l'ordine effettivo dei canali pubblici del modello, ignora i canali non pubblicati o non disponibili e seleziona il provider del primo canale disponibile. Include gli endpoint disponibili di quel provider con lo stesso ID modello upstream e lo stesso livello di servizio. I canali espliciti vengono convalidati nell'ordine indicato dal client; viene inviato solo il gruppo di provider del primo canale. Nessun fallback automatico ad altri provider. Le intestazioni dei provider legacy non possono ignorare l'instradamento dei canali.

Corpo·ResponsesRequest
obbligatorio
application/json
  • input
    obbligatorio
    • Tipo: string
  • model
    Tipo: string
    obbligatorio
  • include
    Tipo: array string[]
  • instructions
    Tipo: string
  • max_output_tokens
    Tipo: integer
    min:  
    1

    Integer numbers.

  • metadata
    Tipo: object
    • propertyName
      Tipo: anything
  • previous_response_id
    Tipo: string
  • reasoning
    Tipo: object
    • propertyName
      Tipo: anything
  • service_tier
    Tipo: string | null

    Attualmente è supportato solo default (standard). Se omesso, null, alias e stringhe non supportate ricadono su default; altri tipi restituiscono HTTP 400. I canali e i prezzi configurati restano invariati. Le API di testo inviano il valore standard del provider; le API Decisions e di generazione omettono il campo upstream.

  • store
    Tipo: boolean
  • stream
    Tipo: boolean
  • temperature
    Tipo: number
    min:  
    0
  • propertyName
    Tipo: anything
  • text
    Tipo: object
    • propertyName
      Tipo: anything
  • tool_choice
    • Tipo: string
  • tools
    Tipo: array object[]
    • propertyName
      Tipo: anything
  • top_p
    Tipo: number
    min:  
    0
    max:  
    1
  • propertyName
    Tipo: anything
Risposte
  • 200
    Tipo: object · ResponsesResponse

    Oggetto di risposta o eventi di risposta in streaming

    • id
      Tipo: string
      obbligatorio
    • object
      const:  
      response
      obbligatorio
    • status
      Tipo: string enum
      obbligatorio
      valori
      • completed
      • failed
      • in_progress
      • cancelled
      • queued
      • incomplete
    • error
      Tipo: object · ResponsesError
      • code
        Tipo: string
        obbligatorio
      • message
        Tipo: string
        obbligatorio
      • propertyName
        Tipo: anything
    • metadata
      Tipo: object
      • propertyName
        Tipo: anything
    • model
      Tipo: string
    • output
      Tipo: array object[]
      • propertyName
        Tipo: anything
    • output_text
      Tipo: string
    • usage
      Tipo: object · Usage

      Oggetto di utilizzo del provider. I campi variano in base all'endpoint e al provider.

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

    Richiesta, modello o mappatura del provider non validi

    Struttura di errore compatibile con OpenAI. Il Router può includere code e message senza tutti i campi upstream facoltativi.

    • error
      Tipo: object
      obbligatorio
      • message
        Tipo: string
        obbligatorio
      • code
        Tipo: string | null
      • param
        Tipo: string | null
      • type
        Tipo: string

        Tipo di errore compatibile con OpenAI, se fornito.

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

    Chiave API Felo non valida o mancante

    Struttura di errore compatibile con OpenAI. Il Router può includere code e message senza tutti i campi upstream facoltativi.

    • error
      Tipo: object
      obbligatorio
      • message
        Tipo: string
        obbligatorio
      • code
        Tipo: string | null
      • param
        Tipo: string | null
      • type
        Tipo: string

        Tipo di errore compatibile con OpenAI, se fornito.

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

    Saldo insufficiente

    Struttura di errore compatibile con OpenAI. Il Router può includere code e message senza tutti i campi upstream facoltativi.

    • error
      Tipo: object
      obbligatorio
      • message
        Tipo: string
        obbligatorio
      • code
        Tipo: string | null
      • param
        Tipo: string | null
      • type
        Tipo: string

        Tipo di errore compatibile con OpenAI, se fornito.

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

    L'account non è autorizzato a usare il modello. Anche i modelli disattivati vengono rifiutati prima delle chiamate upstream. Le richieste e le attività già accettate proseguono.

    Struttura di errore compatibile con OpenAI. Il Router può includere code e message senza tutti i campi upstream facoltativi.

    • error
      Tipo: object
      obbligatorio
      • message
        Tipo: string
        obbligatorio
      • code
        Tipo: string | null
      • param
        Tipo: string | null
      • type
        Tipo: string

        Tipo di errore compatibile con OpenAI, se fornito.

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

    Limite di spesa o di richieste raggiunto

    Struttura di errore compatibile con OpenAI. Il Router può includere code e message senza tutti i campi upstream facoltativi.

    • error
      Tipo: object
      obbligatorio
      • message
        Tipo: string
        obbligatorio
      • code
        Tipo: string | null
      • param
        Tipo: string | null
      • type
        Tipo: string

        Tipo di errore compatibile con OpenAI, se fornito.

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

    Richiesta al provider upstream non riuscita

    Struttura di errore compatibile con OpenAI. Il Router può includere code e message senza tutti i campi upstream facoltativi.

    • error
      Tipo: object
      obbligatorio
      • message
        Tipo: string
        obbligatorio
      • code
        Tipo: string | null
      • param
        Tipo: string | null
      • type
        Tipo: string

        Tipo di errore compatibile con OpenAI, se fornito.

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

    Provider o servizio di fatturazione non disponibile

    Struttura di errore compatibile con OpenAI. Il Router può includere code e message senza tutti i campi upstream facoltativi.

    • error
      Tipo: object
      obbligatorio
      • message
        Tipo: string
        obbligatorio
      • code
        Tipo: string | null
      • param
        Tipo: string | null
      • type
        Tipo: string

        Tipo di errore compatibile con OpenAI, se fornito.

      • propertyName
        Tipo: anything
    • propertyName
      Tipo: anything
    application/json
Request Example for post/api/v1/responses
curl https://openapi.felo.ai/api/v1/responses \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "model": "gpt-5.5",
  "input": "Explain why the sky is blue in one sentence.",
  "stream": false
}'
{
  "id": "string",
  "object": "response",
  "status": "completed",
  "output": [
    {
      "additionalProperty": "anything"
    }
  ],
  "output_text": "string",
  "error": {
    "code": "string",
    "message": "string",
    "additionalProperty": "anything"
  },
  "usage": {
    "additionalProperty": "anything"
  },
  "model": "string",
  "metadata": {
    "additionalProperty": "anything"
  },
  "additionalProperty": "anything"
}
Create a model response