openapi: 3.1.0
info:
  title: Dedalus API
  description: |-
    MCP gateway for AI agents. Mix-and-match any model with any tool from our marketplace.

    ## Authentication
    Use Bearer token or X-API-Key header authentication:
    ```
    Authorization: Bearer your-api-key-here
    ```
    ```
    x-api-key: your-api-key-here
    ```

    ## Available Endpoints
    - **GET /v1/models**: list available models
    - **POST /v1/chat/completions**: Chat completions with MCP tools
    - **GET /health**: Service health check
  version: 0.0.1
servers:
  - url: https://api.dedaluslabs.ai
    description: Official Dedalus API
paths:
  /health:
    get:
      tags:
        - health
      summary: Health Check
      description: Simple health check.
      operationId: health_check_health_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HealthResponse'
      x-hidden: true
  /v1/models:
    get:
      tags:
        - v1
        - v1
      summary: List Models
      description: |-
        List available models.

        Retrieve the complete list of models available to your organization, including
        models from OpenAI, Anthropic, Google, xAI, Mistral, Fireworks, and DeepSeek.

        Returns:
            ListModelsResponse: List of available models across all supported providers
      operationId: list_models_v1_models_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListModelsResponse'
      security:
        - Bearer: []
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Dedalus from 'dedalus-labs';

            const client = new Dedalus({
              apiKey: process.env['DEDALUS_API_KEY'], // This is the default and can be omitted
            });

            const listModelsResponse = await client.models.list();

            console.log(listModelsResponse.data);
        - lang: Python
          source: |-
            import os
            from dedalus_labs import Dedalus

            client = Dedalus(
                api_key=os.environ.get("DEDALUS_API_KEY"),  # This is the default and can be omitted
            )
            list_models_response = client.models.list()
            print(list_models_response.data)
        - lang: Go
          source: |
            package main

            import (
              "context"
              "fmt"

              "github.com/dedalus-labs/dedalus-sdk-go"
              "github.com/dedalus-labs/dedalus-sdk-go/option"
            )

            func main() {
              client := githubcomdedaluslabsdedalussdkgo.NewClient(
                option.WithAPIKey("My API Key"),
              )
              listModelsResponse, err := client.Models.List(context.TODO())
              if err != nil {
                panic(err.Error())
              }
              fmt.Printf("%+v\n", listModelsResponse.Data)
            }
        - lang: cURL
          source: |-
            curl https://api.dedaluslabs.ai/v1/models \
                -H 'User-Agent: Dedalus-SDK' \
                -H 'X-SDK-Version: 1.0.0' \
                -H "Authorization: Bearer $DEDALUS_API_KEY"
  /v1/models/{model_id}:
    get:
      tags:
        - v1
        - v1
      summary: Get Model
      description: |-
        Retrieve a model.

        Retrieve detailed information about a specific model, including its capabilities,
        provider, and supported features.

        Args:
            model_id: The ID of the model to retrieve (e.g., 'openai/gpt-4', 'anthropic/claude-3-5-sonnet-20241022')
            user: Authenticated user obtained from API key validation

        Returns:
            Model: Information about the requested model

        Raises:
            HTTPException:
                - 401 if authentication fails
                - 404 if model not found or not accessible with current API key
                - 500 if internal error occurs

        Requires:
            Valid API key with 'read' scope permission

        Example:
            ```python
            import dedalus_labs

            client = dedalus_labs.Client(api_key="your-api-key")
            model = client.models.retrieve("openai/gpt-4")

            print(f"Model: {model.id}")
            print(f"Owner: {model.owned_by}")
            ```

            Response:
            ```json
            {
                "id": "openai/gpt-4",
                "object": "model",
                "created": 1687882411,
                "owned_by": "openai"
            }
            ```
      operationId: get_model_v1_models__model_id__get
      security:
        - Bearer: []
      parameters:
        - name: model_id
          in: path
          required: true
          schema:
            type: string
            title: Model Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Model'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Dedalus from 'dedalus-labs';

            const client = new Dedalus({
              apiKey: process.env['DEDALUS_API_KEY'], // This is the default and can be omitted
            });

            const model = await client.models.retrieve('model_id');

            console.log(model.id);
        - lang: Python
          source: |-
            import os
            from dedalus_labs import Dedalus

            client = Dedalus(
                api_key=os.environ.get("DEDALUS_API_KEY"),  # This is the default and can be omitted
            )
            model = client.models.retrieve(
                "model_id",
            )
            print(model.id)
        - lang: Go
          source: |
            package main

            import (
              "context"
              "fmt"

              "github.com/dedalus-labs/dedalus-sdk-go"
              "github.com/dedalus-labs/dedalus-sdk-go/option"
            )

            func main() {
              client := githubcomdedaluslabsdedalussdkgo.NewClient(
                option.WithAPIKey("My API Key"),
              )
              model, err := client.Models.Get(context.TODO(), "model_id")
              if err != nil {
                panic(err.Error())
              }
              fmt.Printf("%+v\n", model.ID)
            }
        - lang: cURL
          source: |-
            curl https://api.dedaluslabs.ai/v1/models/$MODEL_ID \
                -H 'User-Agent: Dedalus-SDK' \
                -H 'X-SDK-Version: 1.0.0' \
                -H "Authorization: Bearer $DEDALUS_API_KEY"
  /v1/chat/completions:
    post:
      tags:
        - v1
        - chat
      summary: Create Chat Completion
      description: |-
        Create a chat completion.

        Generates a model response for the given conversation and configuration.
        Supports OpenAI-compatible parameters and provider-specific extensions.

        Headers:
          - Authorization: bearer key for the calling account.
          - Optional BYOK or provider headers if applicable.

        Behavior:
          - If multiple models are supplied, the first one is used, and the agent may hand off to another model.
          - Tools may be invoked on the server or signaled for the client to run.
          - Streaming responses emit incremental deltas; non-streaming returns a single object.
          - Usage metrics are computed when available and returned in the response.

        Responses:
          - 200 OK: JSON completion object with choices, message content, and usage.
          - 400 Bad Request: validation error.
          - 401 Unauthorized: authentication failed.
          - 402 Payment Required or 429 Too Many Requests: quota, balance, or rate limit issue.
          - 500 Internal Server Error: unexpected failure.

        Billing:
          - Token usage metered by the selected model(s).
          - Tool calls and MCP sessions may be billed separately.
          - Streaming is settled after the stream ends via an async task.

        Example (non-streaming HTTP):
          POST /v1/chat/completions
          Content-Type: application/json
          Authorization: Bearer <key>

          {
            "model": "provider/model-name",
            "messages": [{"role": "user", "content": "Hello"}]
          }

          200 OK
          {
            "id": "cmpl_123",
            "object": "chat.completion",
            "choices": [
              {"index": 0, "message": {"role": "assistant", "content": "Hi there!"}, "finish_reason": "stop"}
            ],
            "usage": {"prompt_tokens": 3, "completion_tokens": 4, "total_tokens": 7}
          }

        Example (streaming over SSE):
          POST /v1/chat/completions
          Accept: text/event-stream

          data: {"id":"cmpl_123","choices":[{"index":0,"delta":{"content":"Hi"}}]}
          data: {"id":"cmpl_123","choices":[{"index":0,"delta":{"content":" there!"}}]}
          data: [DONE]
      operationId: create_chat_completion_v1_chat_completions_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChatCompletionRequest'
        required: true
      responses:
        '200':
          description: JSON or SSE stream of ChatCompletionChunk events
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChatCompletion'
            text/event-stream:
              schema:
                $ref: '#/components/schemas/CreateChatCompletionStreamResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - Bearer: []
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Dedalus from 'dedalus-labs';

            const client = new Dedalus({
              apiKey: process.env['DEDALUS_API_KEY'], // This is the default and can be omitted
            });

            const chatCompletion = await client.chat.completions.create({ model: 'openai/gpt-5' });

            console.log(chatCompletion.id);
        - lang: Python
          source: |-
            import os
            from dedalus_labs import Dedalus

            client = Dedalus(
                api_key=os.environ.get("DEDALUS_API_KEY"),  # This is the default and can be omitted
            )
            chat_completion = client.chat.completions.create(
                model="openai/gpt-5",
            )
            print(chat_completion.id)
        - lang: Go
          source: |
            package main

            import (
              "context"
              "fmt"

              "github.com/dedalus-labs/dedalus-sdk-go"
              "github.com/dedalus-labs/dedalus-sdk-go/option"
              "github.com/dedalus-labs/dedalus-sdk-go/shared"
            )

            func main() {
              client := githubcomdedaluslabsdedalussdkgo.NewClient(
                option.WithAPIKey("My API Key"),
              )
              chatCompletion, err := client.Chat.Completions.New(context.TODO(), githubcomdedaluslabsdedalussdkgo.ChatCompletionNewParams{
                Model: githubcomdedaluslabsdedalussdkgo.F[githubcomdedaluslabsdedalussdkgo.ChatCompletionNewParamsModelUnion](shared.UnionString("openai/gpt-5")),
              })
              if err != nil {
                panic(err.Error())
              }
              fmt.Printf("%+v\n", chatCompletion.ID)
            }
        - lang: cURL
          source: |-
            curl https://api.dedaluslabs.ai/v1/chat/completions \
                -H 'Content-Type: application/json' \
                -H 'User-Agent: Dedalus-SDK' \
                -H 'X-SDK-Version: 1.0.0' \
                -H "Authorization: Bearer $DEDALUS_API_KEY" \
                -d '{
                      "model": "openai/gpt-5"
                    }'
  /v1/embeddings:
    post:
      tags:
        - v1
        - v1
      summary: Create Embeddings
      description: Create embeddings using the configured provider.
      operationId: create_embeddings_v1_embeddings_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateEmbeddingRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateEmbeddingResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - Bearer: []
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import Dedalus from 'dedalus-labs';


            const client = new Dedalus({
              apiKey: process.env['DEDALUS_API_KEY'], // This is the default and can be omitted
            });


            const createEmbeddingResponse = await client.embeddings.create({ input: 'string', model: 'string'
            });


            console.log(createEmbeddingResponse.data);
        - lang: Python
          source: |-
            import os
            from dedalus_labs import Dedalus

            client = Dedalus(
                api_key=os.environ.get("DEDALUS_API_KEY"),  # This is the default and can be omitted
            )
            create_embedding_response = client.embeddings.create(
                input="string",
                model="string",
            )
            print(create_embedding_response.data)
        - lang: Go
          source: |
            package main

            import (
              "context"
              "fmt"

              "github.com/dedalus-labs/dedalus-sdk-go"
              "github.com/dedalus-labs/dedalus-sdk-go/option"
              "github.com/dedalus-labs/dedalus-sdk-go/shared"
            )

            func main() {
              client := githubcomdedaluslabsdedalussdkgo.NewClient(
                option.WithAPIKey("My API Key"),
              )
              createEmbeddingResponse, err := client.Embeddings.New(context.TODO(), githubcomdedaluslabsdedalussdkgo.EmbeddingNewParams{
                CreateEmbeddingRequest: githubcomdedaluslabsdedalussdkgo.CreateEmbeddingRequestParam{
                  Input: githubcomdedaluslabsdedalussdkgo.F[githubcomdedaluslabsdedalussdkgo.CreateEmbeddingRequestInputUnionParam](shared.UnionString("string")),
                  Model: githubcomdedaluslabsdedalussdkgo.F(githubcomdedaluslabsdedalussdkgo.CreateEmbeddingRequestModelTextEmbeddingAda002),
                },
              })
              if err != nil {
                panic(err.Error())
              }
              fmt.Printf("%+v\n", createEmbeddingResponse.Data)
            }
        - lang: cURL
          source: |-
            curl https://api.dedaluslabs.ai/v1/embeddings \
                -H 'Content-Type: application/json' \
                -H 'User-Agent: Dedalus-SDK' \
                -H 'X-SDK-Version: 1.0.0' \
                -H "Authorization: Bearer $DEDALUS_API_KEY" \
                -d '{
                      "input": "string",
                      "model": "string"
                    }'
  /v1/audio/speech:
    post:
      tags:
        - v1
        - audio
      summary: Create Speech
      description: |-
        Generate speech audio from text.

        Generates audio from the input text using text-to-speech models. Supports multiple
        voices and output formats including mp3, opus, aac, flac, wav, and pcm.

        Returns streaming audio data that can be saved to a file or streamed directly to users.
      operationId: create_speech_v1_audio_speech_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSpeechRequest'
        required: true
      responses:
        '200':
          description: Audio file stream
          content:
            audio/mpeg:
              schema:
                type: string
                format: binary
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - Bearer: []
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Dedalus from 'dedalus-labs';

            const client = new Dedalus({
              apiKey: process.env['DEDALUS_API_KEY'], // This is the default and can be omitted
            });

            const speech = await client.audio.speech.create({
              input: 'Hello, how are you today?',
              model: 'openai/tts-1',
              voice: 'alloy',
            });

            console.log(speech);

            const content = await speech.blob();
            console.log(content);
        - lang: Python
          source: |-
            import os
            from dedalus_labs import Dedalus

            client = Dedalus(
                api_key=os.environ.get("DEDALUS_API_KEY"),  # This is the default and can be omitted
            )
            speech = client.audio.speech.create(
                input="Hello, how are you today?",
                model="openai/tts-1",
                voice="alloy",
            )
            print(speech)
            content = speech.read()
            print(content)
        - lang: Go
          source: |
            package main

            import (
              "context"
              "fmt"

              "github.com/dedalus-labs/dedalus-sdk-go"
              "github.com/dedalus-labs/dedalus-sdk-go/option"
            )

            func main() {
              client := githubcomdedaluslabsdedalussdkgo.NewClient(
                option.WithAPIKey("My API Key"),
              )
              speech, err := client.Audio.Speech.New(context.TODO(), githubcomdedaluslabsdedalussdkgo.AudioSpeechNewParams{
                Input: githubcomdedaluslabsdedalussdkgo.F("Hello, how are you today?"),
                Model: githubcomdedaluslabsdedalussdkgo.F("openai/tts-1"),
                Voice: githubcomdedaluslabsdedalussdkgo.F(githubcomdedaluslabsdedalussdkgo.AudioSpeechNewParamsVoiceAlloy),
              })
              if err != nil {
                panic(err.Error())
              }
              fmt.Printf("%+v\n", speech)
            }
        - lang: cURL
          source: |-
            curl https://api.dedaluslabs.ai/v1/audio/speech \
                -H 'Content-Type: application/json' \
                -H 'User-Agent: Dedalus-SDK' \
                -H 'X-SDK-Version: 1.0.0' \
                -H "Authorization: Bearer $DEDALUS_API_KEY" \
                -d '{
                      "input": "Hello, how are you today?",
                      "model": "openai/tts-1",
                      "voice": "alloy"
                    }'
  /v1/audio/transcriptions:
    post:
      tags:
        - v1
        - audio
      summary: Create Transcription
      description: |-
        Transcribe audio into text.

        Transcribes audio files using OpenAI's Whisper model. Supports multiple audio formats
        including mp3, mp4, mpeg, mpga, m4a, wav, and webm. Maximum file size is 25 MB.

        Args:
            file: Audio file to transcribe (required)
            model: Model ID to use (e.g., "openai/whisper-1")
            language: ISO-639-1 language code (e.g., "en", "es") - improves accuracy
            prompt: Optional text to guide the model's style
            response_format: Format of the output (json, text, srt, verbose_json, vtt)
            temperature: Sampling temperature between 0 and 1

        Returns:
            Transcription object with the transcribed text
      operationId: create_transcription_v1_audio_transcriptions_post
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Body_create_transcription_v1_audio_transcriptions_post'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/CreateTranscriptionResponseVerboseJson'
                  - $ref: '#/components/schemas/CreateTranscriptionResponseJson'
                title: Response Create Transcription V1 Audio Transcriptions Post
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - Bearer: []
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Dedalus from 'dedalus-labs';

            const client = new Dedalus({
              apiKey: process.env['DEDALUS_API_KEY'], // This is the default and can be omitted
            });

            const transcription = await client.audio.transcriptions.create({
              file: fs.createReadStream('path/to/file'),
              model: 'model',
            });

            console.log(transcription);
        - lang: Python
          source: |-
            import os
            from dedalus_labs import Dedalus

            client = Dedalus(
                api_key=os.environ.get("DEDALUS_API_KEY"),  # This is the default and can be omitted
            )
            transcription = client.audio.transcriptions.create(
                file=b"raw file contents",
                model="model",
            )
            print(transcription)
        - lang: Go
          source: |
            package main

            import (
              "bytes"
              "context"
              "fmt"
              "io"

              "github.com/dedalus-labs/dedalus-sdk-go"
              "github.com/dedalus-labs/dedalus-sdk-go/option"
            )

            func main() {
              client := githubcomdedaluslabsdedalussdkgo.NewClient(
                option.WithAPIKey("My API Key"),
              )
              transcription, err := client.Audio.Transcriptions.New(context.TODO(), githubcomdedaluslabsdedalussdkgo.AudioTranscriptionNewParams{
                File: githubcomdedaluslabsdedalussdkgo.F(io.Reader(bytes.NewBuffer([]byte("some file contents")))),
                Model: githubcomdedaluslabsdedalussdkgo.F("model"),
              })
              if err != nil {
                panic(err.Error())
              }
              fmt.Printf("%+v\n", transcription)
            }
        - lang: cURL
          source: |-
            curl https://api.dedaluslabs.ai/v1/audio/transcriptions \
                -H 'Content-Type: multipart/form-data' \
                -H 'User-Agent: Dedalus-SDK' \
                -H 'X-SDK-Version: 1.0.0' \
                -H "Authorization: Bearer $DEDALUS_API_KEY" \
                -F 'file=@/path/to/file' \
                -F model=model
  /v1/audio/translations:
    post:
      tags:
        - v1
        - audio
      summary: Create Translation
      description: |-
        Translate audio into English.

        Translates audio files in any supported language to English text using OpenAI's
        Whisper model. Supports the same audio formats as transcription. Maximum file size
        is 25 MB.

        Args:
            file: Audio file to translate (required)
            model: Model ID to use (e.g., "openai/whisper-1")
            prompt: Optional text to guide the model's style
            response_format: Format of the output (json, text, srt, verbose_json, vtt)
            temperature: Sampling temperature between 0 and 1

        Returns:
            Translation object with the English translation
      operationId: create_translation_v1_audio_translations_post
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Body_create_translation_v1_audio_translations_post'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/CreateTranslationResponseVerboseJson'
                  - $ref: '#/components/schemas/CreateTranslationResponseJson'
                title: Response Create Translation V1 Audio Translations Post
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - Bearer: []
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Dedalus from 'dedalus-labs';

            const client = new Dedalus({
              apiKey: process.env['DEDALUS_API_KEY'], // This is the default and can be omitted
            });

            const translation = await client.audio.translations.create({
              file: fs.createReadStream('path/to/file'),
              model: 'model',
            });

            console.log(translation);
        - lang: Python
          source: |-
            import os
            from dedalus_labs import Dedalus

            client = Dedalus(
                api_key=os.environ.get("DEDALUS_API_KEY"),  # This is the default and can be omitted
            )
            translation = client.audio.translations.create(
                file=b"raw file contents",
                model="model",
            )
            print(translation)
        - lang: Go
          source: |
            package main

            import (
              "bytes"
              "context"
              "fmt"
              "io"

              "github.com/dedalus-labs/dedalus-sdk-go"
              "github.com/dedalus-labs/dedalus-sdk-go/option"
            )

            func main() {
              client := githubcomdedaluslabsdedalussdkgo.NewClient(
                option.WithAPIKey("My API Key"),
              )
              translation, err := client.Audio.Translations.New(context.TODO(), githubcomdedaluslabsdedalussdkgo.AudioTranslationNewParams{
                File: githubcomdedaluslabsdedalussdkgo.F(io.Reader(bytes.NewBuffer([]byte("some file contents")))),
                Model: githubcomdedaluslabsdedalussdkgo.F("model"),
              })
              if err != nil {
                panic(err.Error())
              }
              fmt.Printf("%+v\n", translation)
            }
        - lang: cURL
          source: |-
            curl https://api.dedaluslabs.ai/v1/audio/translations \
                -H 'Content-Type: multipart/form-data' \
                -H 'User-Agent: Dedalus-SDK' \
                -H 'X-SDK-Version: 1.0.0' \
                -H "Authorization: Bearer $DEDALUS_API_KEY" \
                -F 'file=@/path/to/file' \
                -F model=model
  /v1/images/generations:
    post:
      tags:
        - v1
        - images
      summary: Create Image
      description: |-
        Generate images from text prompts.

        Pure image generation models only (DALL-E, GPT Image).
        For multimodal models like gemini-2.5-flash-image, use /v1/chat/completions.
      operationId: create_image_v1_images_generations_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ImageGenerateRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ImagesResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - Bearer: []
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Dedalus from 'dedalus-labs';

            const client = new Dedalus({
              apiKey: process.env['DEDALUS_API_KEY'], // This is the default and can be omitted
            });

            const imagesResponse = await client.images.generate({ prompt: 'A white siamese cat' });

            console.log(imagesResponse.created);
        - lang: Python
          source: |-
            import os
            from dedalus_labs import Dedalus

            client = Dedalus(
                api_key=os.environ.get("DEDALUS_API_KEY"),  # This is the default and can be omitted
            )
            images_response = client.images.generate(
                prompt="A white siamese cat",
            )
            print(images_response.created)
        - lang: Go
          source: |
            package main

            import (
              "context"
              "fmt"

              "github.com/dedalus-labs/dedalus-sdk-go"
              "github.com/dedalus-labs/dedalus-sdk-go/option"
            )

            func main() {
              client := githubcomdedaluslabsdedalussdkgo.NewClient(
                option.WithAPIKey("My API Key"),
              )
              imagesResponse, err := client.Images.Generate(context.TODO(), githubcomdedaluslabsdedalussdkgo.ImageGenerateParams{
                CreateImageRequest: githubcomdedaluslabsdedalussdkgo.CreateImageRequestParam{
                  Prompt: githubcomdedaluslabsdedalussdkgo.F("A white siamese cat"),
                },
              })
              if err != nil {
                panic(err.Error())
              }
              fmt.Printf("%+v\n", imagesResponse.Created)
            }
        - lang: cURL
          source: |-
            curl https://api.dedaluslabs.ai/v1/images/generations \
                -H 'Content-Type: application/json' \
                -H 'User-Agent: Dedalus-SDK' \
                -H 'X-SDK-Version: 1.0.0' \
                -H "Authorization: Bearer $DEDALUS_API_KEY" \
                -d '{
                      "prompt": "A white siamese cat"
                    }'
  /v1/images/edits:
    post:
      tags:
        - v1
        - images
      summary: Edit Image
      description: |-
        Edit images using inpainting.

        Supports dall-e-2 and gpt-image-1. Upload an image and optionally a mask
        to indicate which areas to regenerate based on the prompt.
      operationId: edit_image_v1_images_edits_post
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Body_edit_image_v1_images_edits_post'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ImagesResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - Bearer: []
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Dedalus from 'dedalus-labs';

            const client = new Dedalus({
              apiKey: process.env['DEDALUS_API_KEY'], // This is the default and can be omitted
            });

            const imagesResponse = await client.images.edit({
              image: fs.createReadStream('path/to/file'),
              prompt: 'prompt',
            });

            console.log(imagesResponse.created);
        - lang: Python
          source: |-
            import os
            from dedalus_labs import Dedalus

            client = Dedalus(
                api_key=os.environ.get("DEDALUS_API_KEY"),  # This is the default and can be omitted
            )
            images_response = client.images.edit(
                image=b"raw file contents",
                prompt="prompt",
            )
            print(images_response.created)
        - lang: Go
          source: |
            package main

            import (
              "bytes"
              "context"
              "fmt"
              "io"

              "github.com/dedalus-labs/dedalus-sdk-go"
              "github.com/dedalus-labs/dedalus-sdk-go/option"
            )

            func main() {
              client := githubcomdedaluslabsdedalussdkgo.NewClient(
                option.WithAPIKey("My API Key"),
              )
              imagesResponse, err := client.Images.Edit(context.TODO(), githubcomdedaluslabsdedalussdkgo.ImageEditParams{
                Image: githubcomdedaluslabsdedalussdkgo.F(io.Reader(bytes.NewBuffer([]byte("some file contents")))),
                Prompt: githubcomdedaluslabsdedalussdkgo.F("prompt"),
              })
              if err != nil {
                panic(err.Error())
              }
              fmt.Printf("%+v\n", imagesResponse.Created)
            }
        - lang: cURL
          source: |-
            curl https://api.dedaluslabs.ai/v1/images/edits \
                -H 'Content-Type: multipart/form-data' \
                -H 'User-Agent: Dedalus-SDK' \
                -H 'X-SDK-Version: 1.0.0' \
                -H "Authorization: Bearer $DEDALUS_API_KEY" \
                -F 'image=@/path/to/image' \
                -F prompt=prompt
  /v1/images/variations:
    post:
      tags:
        - v1
        - images
      summary: Create Variation
      description: |-
        Create variations of an image.

        DALL·E 2 only. Upload an image to generate variations.
      operationId: create_variation_v1_images_variations_post
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Body_create_variation_v1_images_variations_post'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ImagesResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - Bearer: []
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import Dedalus from 'dedalus-labs';


            const client = new Dedalus({
              apiKey: process.env['DEDALUS_API_KEY'], // This is the default and can be omitted
            });


            const imagesResponse = await client.images.createVariation({ image:
            fs.createReadStream('path/to/file') });


            console.log(imagesResponse.created);
        - lang: Python
          source: |-
            import os
            from dedalus_labs import Dedalus

            client = Dedalus(
                api_key=os.environ.get("DEDALUS_API_KEY"),  # This is the default and can be omitted
            )
            images_response = client.images.create_variation(
                image=b"raw file contents",
            )
            print(images_response.created)
        - lang: Go
          source: |
            package main

            import (
              "bytes"
              "context"
              "fmt"
              "io"

              "github.com/dedalus-labs/dedalus-sdk-go"
              "github.com/dedalus-labs/dedalus-sdk-go/option"
            )

            func main() {
              client := githubcomdedaluslabsdedalussdkgo.NewClient(
                option.WithAPIKey("My API Key"),
              )
              imagesResponse, err := client.Images.NewVariation(context.TODO(), githubcomdedaluslabsdedalussdkgo.ImageNewVariationParams{
                Image: githubcomdedaluslabsdedalussdkgo.F(io.Reader(bytes.NewBuffer([]byte("some file contents")))),
              })
              if err != nil {
                panic(err.Error())
              }
              fmt.Printf("%+v\n", imagesResponse.Created)
            }
        - lang: cURL
          source: |-
            curl https://api.dedaluslabs.ai/v1/images/variations \
                -H 'Content-Type: multipart/form-data' \
                -H 'User-Agent: Dedalus-SDK' \
                -H 'X-SDK-Version: 1.0.0' \
                -H "Authorization: Bearer $DEDALUS_API_KEY" \
                -F 'image=@/path/to/image'
  /:
    get:
      summary: Root
      operationId: root__get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RootResponse'
  /favicon.ico:
    get:
      tags:
        - private
      summary: Favicon
      description: Browser favicon endpoint. Automatically excluded from SDK generation.
      operationId: favicon_favicon_ico_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '204':
          description: No Content
      deprecated: true
components:
  schemas:
    Audio:
      properties:
        id:
          type: string
          title: Id
          description: Unique identifier for a previous audio response from the model.
          x-order: 0
      type: object
      required:
        - id
      title: Audio
      description: |-
        Data about a previous audio response from the model.
        [Learn more](https://platform.openai.com/docs/guides/audio).

        Fields:
        - id (required): str
      x-ddls-inline: true
    Body_create_transcription_v1_audio_transcriptions_post:
      properties:
        file:
          type: string
          format: binary
          title: File
        model:
          type: string
          title: Model
        language:
          anyOf:
            - type: string
            - type: 'null'
          title: Language
        prompt:
          anyOf:
            - type: string
            - type: 'null'
          title: Prompt
        response_format:
          anyOf:
            - type: string
            - type: 'null'
          title: Response Format
        temperature:
          anyOf:
            - type: number
            - type: 'null'
          title: Temperature
      type: object
      required:
        - file
        - model
      title: Body_create_transcription_v1_audio_transcriptions_post
    Body_create_translation_v1_audio_translations_post:
      properties:
        file:
          type: string
          format: binary
          title: File
        model:
          type: string
          title: Model
        prompt:
          anyOf:
            - type: string
            - type: 'null'
          title: Prompt
        response_format:
          anyOf:
            - type: string
            - type: 'null'
          title: Response Format
        temperature:
          anyOf:
            - type: number
            - type: 'null'
          title: Temperature
      type: object
      required:
        - file
        - model
      title: Body_create_translation_v1_audio_translations_post
    Body_create_variation_v1_images_variations_post:
      properties:
        image:
          type: string
          format: binary
          title: Image
        model:
          anyOf:
            - type: string
            - type: 'null'
          title: Model
          default: openai/dall-e-2
        'n':
          anyOf:
            - type: integer
            - type: 'null'
          title: 'N'
          default: 1
        size:
          anyOf:
            - type: string
            - type: 'null'
          title: Size
          default: 1024x1024
        response_format:
          anyOf:
            - type: string
            - type: 'null'
          title: Response Format
          default: url
        user:
          anyOf:
            - type: string
            - type: 'null'
          title: User
      type: object
      required:
        - image
      title: Body_create_variation_v1_images_variations_post
    Body_edit_image_v1_images_edits_post:
      properties:
        image:
          type: string
          format: binary
          title: Image
        prompt:
          type: string
          title: Prompt
        mask:
          anyOf:
            - type: string
              format: binary
            - type: 'null'
          title: Mask
        model:
          anyOf:
            - type: string
            - type: 'null'
          title: Model
          default: openai/dall-e-2
        'n':
          anyOf:
            - type: integer
            - type: 'null'
          title: 'N'
          default: 1
        size:
          anyOf:
            - type: string
            - type: 'null'
          title: Size
          default: 1024x1024
        response_format:
          anyOf:
            - type: string
            - type: 'null'
          title: Response Format
          default: url
        user:
          anyOf:
            - type: string
            - type: 'null'
          title: User
      type: object
      required:
        - image
        - prompt
      title: Body_edit_image_v1_images_edits_post
    ChatCompletion:
      properties:
        id:
          type: string
          title: Id
          description: A unique identifier for the chat completion.
          x-order: 0
        choices:
          items:
            $ref: '#/components/schemas/Choice'
          type: array
          title: Choices
          description: A list of chat completion choices. Can be more than one if `n` is greater than 1.
          x-order: 1
        created:
          type: integer
          title: Created
          description: The Unix timestamp (in seconds) of when the chat completion was created.
          x-order: 2
        model:
          type: string
          title: Model
          description: The model used for the chat completion.
          x-order: 3
        service_tier:
          anyOf:
            - type: string
              enum:
                - auto
                - default
                - flex
                - scale
                - priority
            - type: 'null'
          title: Service Tier
          description: |-
            Specifies the processing type used for serving the request.
              - If set to 'auto', then the request will be processed with the service tier configured in the Project settings. Unless otherwise configured, the Project will use 'default'.
              - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model.
              - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)' or '[priority](https://openai.com/api-priority-processing/)', then the request will be processed with the corresponding service tier.
              - When not set, the default behavior is 'auto'.

              When the `service_tier` parameter is set, the response body will include the `service_tier` value based on the processing mode actually used to serve the request. This response value may be different from the value set in the parameter.
          x-order: 4
        system_fingerprint:
          type: string
          title: System Fingerprint
          description: >-
            This fingerprint represents the backend configuration that the model runs with.


            Can be used in conjunction with the `seed` request parameter to understand when backend changes
            have been made that might impact determinism.
          x-order: 5
        object:
          type: string
          const: chat.completion
          title: Object
          description: The object type, which is always `chat.completion`.
          x-order: 6
        usage:
          $ref: '#/components/schemas/CompletionUsage'
          description: Usage statistics for the completion request.
          x-order: 7
        tools_executed:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Tools Executed
          description: >-
            List of tool names that were executed server-side (e.g., MCP tools). Only present when tools were
            executed on the server rather than returned for client-side execution.
        mcp_server_errors:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Mcp Server Errors
          description: >-
            Information about MCP server failures, if any occurred during the request. Contains details about
            which servers failed and why, along with recommendations for the user. Only present when MCP
            server failures occurred.
        mcp_tool_results:
          anyOf:
            - items:
                $ref: '#/components/schemas/MCPToolResult'
              type: array
            - type: 'null'
          title: Mcp Tool Results
          description: >-
            Detailed results of MCP tool executions including inputs, outputs, and timing. Provides full
            visibility into server-side tool execution for debugging and audit purposes.
      type: object
      required:
        - id
        - choices
        - created
        - model
        - object
      title: ChatCompletion
      description: |-
        Chat completion response for Dedalus API.

        OpenAI-compatible chat completion response with Dedalus extensions.
        Maintains full compatibility with OpenAI API while providing additional
        features like server-side tool execution tracking and MCP error reporting.
      example:
        choices:
          - finish_reason: stop
            index: 0
            message:
              content: The next Warriors game is tomorrow at 7:30 PM.
              role: assistant
        created: 1677652288
        id: chatcmpl-123
        model: gpt-4o-mini
        object: chat.completion
        tools_executed:
          - search_events
          - get_event_details
        usage:
          completion_tokens: 12
          prompt_tokens: 9
          total_tokens: 21
    ChatCompletionFunctions:
      properties:
        description:
          type: string
          title: Description
          description: >-
            A description of what the function does, used by the model to choose when and how to call the
            function.
          x-order: 0
        name:
          type: string
          title: Name
          description: >-
            The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes,
            with a maximum length of 64.
          x-order: 1
        parameters:
          $ref: '#/components/schemas/JSONObject'
          description: >-
            The parameters the functions accepts, described as a JSON Schema object. See the
            [guide](https://platform.openai.com/docs/guides/function-calling) for examples, and the [JSON
            Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the
            format. 


            Omitting `parameters` defines a function with an empty parameter list.
          x-order: 2
      type: object
      required:
        - name
      title: ChatCompletionFunctions
      description: |-
        Schema for ChatCompletionFunctions.

        Fields:
        - description (optional): str
        - name (required): str
        - parameters (optional): FunctionParameters
    ChatCompletionMessageCustomToolCall:
      properties:
        id:
          type: string
          title: Id
          description: The ID of the tool call.
          x-order: 0
        type:
          type: string
          const: custom
          title: Type
          description: The type of the tool. Always `custom`.
          x-order: 1
        custom:
          properties:
            name:
              type: string
              title: Name
              description: The name of the custom tool to call.
              x-order: 0
            input:
              type: string
              title: Input
              description: The input for the custom tool call generated by the model.
              x-order: 1
          type: object
          required:
            - name
            - input
          description: |-
            The custom tool that the model called.

            Fields:
            - name (required): str
            - input (required): str
      type: object
      required:
        - id
        - type
        - custom
      title: ChatCompletionMessageCustomToolCall
      description: |-
        A call to a custom tool created by the model.

        Fields:
        - id (required): str
        - type (required): Literal["custom"]
        - custom (required): ChatCompletionMessageCustomToolCallCustom
    ChatCompletionMessageToolCall:
      properties:
        id:
          type: string
          title: Id
          description: The ID of the tool call.
          x-order: 0
        type:
          type: string
          const: function
          title: Type
          description: The type of the tool. Currently, only `function` is supported.
          x-order: 1
        function:
          properties:
            name:
              type: string
              title: Name
              description: The name of the function to call.
              x-order: 0
            arguments:
              type: string
              title: Arguments
              description: >-
                The arguments to call the function with, as generated by the model in JSON format. Note that
                the model does not always generate valid JSON, and may hallucinate parameters not defined by
                your function schema. Validate the arguments in your code before calling your function.
              x-order: 1
          type: object
          required:
            - name
            - arguments
          description: |-
            The function that the model called.

            Fields:
            - name (required): str
            - arguments (required): str
        thought_signature:
          anyOf:
            - type: string
            - type: 'null'
          title: Thought Signature
          description: Opaque signature for thought continuity in multi-turn tool use (Google-specific, base64 encoded)
      type: object
      required:
        - id
        - type
        - function
      title: ChatCompletionMessageToolCall
      description: |-
        A call to a function tool created by the model.

        Fields:
        - id (required): str
        - type (required): Literal["function"]
        - function (required): ChatCompletionMessageToolCallFunction
        - thought_signature (optional): str
    ChatCompletionRequest:
      properties:
        audio:
          anyOf:
            - $ref: '#/components/schemas/CreateChatCompletionRequestAudio'
            - type: 'null'
          description: >-
            Parameters for audio output. Required when requesting audio responses with `modalities:
            ['audio']`. See: https://platform.openai.com/docs/guides/audio
          examples:
            - format: mp3
              voice: alloy
        frequency_penalty:
          anyOf:
            - type: number
              maximum: 2
              minimum: -2
            - type: 'null'
          title: Frequency Penalty
          description: >-
            Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency
            in the text so far, decreasing the model's likelihood to repeat the same line verbatim.
          default: 0
        function_call:
          anyOf:
            - $ref: '#/components/schemas/FunctionCallFunctionCallMode'
            - type: 'null'
          description: >-
            Deprecated in favor of `tool_choice`.  Controls which (if any) function is called by the model. 
            `none` means the model will not call a function and instead generates a message.  `auto` means the
            model can pick between generating a message or calling a function.  Specifying a particular
            function via `{"name": "my_function"}` forces the model to call that function.  `none` is the
            default when no functions are present. `auto` is the default if functions are present.
        functions:
          anyOf:
            - items:
                $ref: '#/components/schemas/ChatCompletionFunctions'
              type: array
            - type: 'null'
          title: Functions
          description: 'Deprecated in favor of `tools`.  A list of functions the model may generate JSON inputs for. '
        logit_bias:
          anyOf:
            - additionalProperties:
                type: integer
              type: object
            - type: 'null'
          title: Logit Bias
          description: >-
            Modify the likelihood of specified tokens appearing in the completion.  Accepts a JSON object that
            maps tokens (specified by their token ID in the tokenizer) to an associated bias value from -100
            to 100. Mathematically, the bias is added to the logits generated by the model prior to sampling.
            The exact effect will vary per model, but values between -1 and 1 should decrease or increase
            likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of
            the relevant token.
        logprobs:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Logprobs
          description: >-
            Whether to return log probabilities of the output tokens or not. If true, returns the log
            probabilities of each output token returned in the `content` of `message`.
          default: false
        max_completion_tokens:
          anyOf:
            - type: integer
            - type: 'null'
          title: Max Completion Tokens
          description: Maximum tokens in completion (newer parameter name)
        max_tokens:
          anyOf:
            - type: integer
              minimum: 1
            - type: 'null'
          title: Max Tokens
          description: Maximum tokens in completion
        messages:
          anyOf:
            - items:
                oneOf:
                  - $ref: '#/components/schemas/ChatCompletionRequestDeveloperMessage'
                  - $ref: '#/components/schemas/ChatCompletionRequestSystemMessage'
                  - $ref: '#/components/schemas/ChatCompletionRequestUserMessage'
                  - $ref: '#/components/schemas/ChatCompletionRequestAssistantMessage'
                  - $ref: '#/components/schemas/ChatCompletionRequestToolMessage'
                  - $ref: '#/components/schemas/ChatCompletionRequestFunctionMessage'
                discriminator:
                  propertyName: role
                  mapping:
                    assistant: '#/components/schemas/ChatCompletionRequestAssistantMessage'
                    developer: '#/components/schemas/ChatCompletionRequestDeveloperMessage'
                    function: '#/components/schemas/ChatCompletionRequestFunctionMessage'
                    system: '#/components/schemas/ChatCompletionRequestSystemMessage'
                    tool: '#/components/schemas/ChatCompletionRequestToolMessage'
                    user: '#/components/schemas/ChatCompletionRequestUserMessage'
              type: array
            - type: 'null'
          title: Messages
          description: 'Conversation history (OpenAI: messages, Google: contents, Responses: input)'
        metadata:
          anyOf:
            - $ref: '#/components/schemas/JSONObject'
            - type: 'null'
          description: >-
            Set of 16 key-value pairs that can be attached to an object. This can be useful for storing
            additional information about the object in a structured format, and querying for objects via API
            or the dashboard.  Keys are strings with a maximum length of 64 characters. Values are strings
            with a maximum length of 512 characters.
        modalities:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Modalities
          description: >-
            Output types that you would like the model to generate. Most models are capable of generating
            text, which is the default:  `["text"]`  The `gpt-4o-audio-preview` model can also be used to
            [generate audio](https://platform.openai.com/docs/guides/audio). To request that this model
            generate both text and audio responses, you can use:  `["text", "audio"]`
        model:
          anyOf:
            - $ref: '#/components/schemas/DedalusModelChoice'
            - items:
                $ref: '#/components/schemas/DedalusModelChoice'
              type: array
          title: Model
          description: >-
            Model identifier. Accepts model ID strings, lists for routing, or DedalusModel objects with
            per-model settings.
          examples:
            - openai/gpt-5
            - - openai/gpt-5
              - anthropic/claude-3-sonnet
        'n':
          anyOf:
            - type: integer
              maximum: 128
              minimum: 1
            - type: 'null'
          title: 'N'
          description: >-
            How many chat completion choices to generate for each input message. Note that you will be charged
            based on the number of generated tokens across all of the choices. Keep `n` as `1` to minimize
            costs.
          default: 1
        parallel_tool_calls:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Parallel Tool Calls
          description: Whether to enable parallel tool calls (Anthropic uses inverted polarity)
          default: true
        prediction:
          anyOf:
            - $ref: '#/components/schemas/PredictionContent'
            - type: 'null'
          description: >-
            Configuration for a [Predicted Output](https://platform.openai.com/docs/guides/predicted-outputs),
            which can greatly improve response times when large parts of the model response are known ahead of
            time. This is most common when you are regenerating a file with only minor changes to most of the
            content.
        presence_penalty:
          anyOf:
            - type: number
              maximum: 2
              minimum: -2
            - type: 'null'
          title: Presence Penalty
          description: >-
            Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in
            the text so far, increasing the model's likelihood to talk about new topics.
          default: 0
        prompt_cache_key:
          anyOf:
            - type: string
            - type: 'null'
          title: Prompt Cache Key
          description: >-
            Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces
            the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching).
        prompt_cache_retention:
          anyOf:
            - type: string
            - type: 'null'
          title: Prompt Cache Retention
          description: >-
            The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which
            keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn
            more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention).
        reasoning_effort:
          anyOf:
            - type: string
            - type: 'null'
          title: Reasoning Effort
          description: >-
            Constrains effort on reasoning for [reasoning
            models](https://platform.openai.com/docs/guides/reasoning). Currently supported values are `none`,
            `minimal`, `low`, `medium`, and `high`. Reducing reasoning effort can result in faster responses
            and fewer tokens used on reasoning in a response.  - `gpt-5.1` defaults to `none`, which does not
            perform reasoning. The supported reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and
            `high`. Tool calls are supported for all reasoning values in gpt-5.1. - All models before
            `gpt-5.1` default to `medium` reasoning effort, and do not support `none`. - The `gpt-5-pro` model
            defaults to (and only supports) `high` reasoning effort.
          default: medium
        response_format:
          anyOf:
            - oneOf:
                - $ref: '#/components/schemas/ResponseFormatText'
                - $ref: '#/components/schemas/ResponseFormatJsonSchema'
                - $ref: '#/components/schemas/ResponseFormatJsonObject'
              discriminator:
                propertyName: type
                mapping:
                  json_object: '#/components/schemas/ResponseFormatJsonObject'
                  json_schema: '#/components/schemas/ResponseFormatJsonSchema'
                  text: '#/components/schemas/ResponseFormatText'
            - type: 'null'
          title: Response Format
          description: >-
            An object specifying the format that the model must output.  Setting to `{ "type": "json_schema",
            "json_schema": {...} }` enables Structured Outputs which ensures the model will match your
            supplied JSON schema. Learn more in the [Structured Outputs
            guide](https://platform.openai.com/docs/guides/structured-outputs).  Setting to `{ "type":
            "json_object" }` enables the older JSON mode, which ensures the message the model generates is
            valid JSON. Using `json_schema` is preferred for models that support it.
        safety_identifier:
          anyOf:
            - type: string
            - type: 'null'
          title: Safety Identifier
          description: >-
            A stable identifier used to help detect users of your application that may be violating OpenAI's
            usage policies. The IDs should be a string that uniquely identifies each user. We recommend
            hashing their username or email address, in order to avoid sending us any identifying information.
            [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).
        seed:
          anyOf:
            - type: integer
              maximum: 9223372036854776000
              minimum: 0
            - type: 'null'
          title: Seed
          description: Random seed for deterministic output
        service_tier:
          anyOf:
            - type: string
            - type: 'null'
          title: Service Tier
          description: Service tier for request processing
          default: auto
        stop:
          anyOf:
            - items:
                type: string
              type: array
            - type: string
            - type: 'null'
          title: Stop
          description: Sequences that stop generation
        store:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Store
          description: >-
            Whether or not to store the output of this chat completion request for use in our [model
            distillation](https://platform.openai.com/docs/guides/distillation) or
            [evals](https://platform.openai.com/docs/guides/evals) products.  Supports text and image inputs.
            Note: image inputs over 8MB will be dropped.
          default: false
        stream:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Stream
          description: Enable streaming response
          default: false
        stream_options:
          anyOf:
            - $ref: '#/components/schemas/JSONObject'
            - type: 'null'
          description: 'Options for streaming response. Only set this when you set `stream: true`. '
        system_instruction:
          anyOf:
            - $ref: '#/components/schemas/JSONObject'
            - type: string
            - type: 'null'
          title: System Instruction
          description: System instruction/prompt
        temperature:
          anyOf:
            - type: number
              maximum: 1
              minimum: 0
            - type: 'null'
          title: Temperature
          description: Sampling temperature (0-2 for most providers)
          default: 1
        tool_choice:
          anyOf:
            - oneOf:
                - $ref: '#/components/schemas/ToolChoiceAuto'
                - $ref: '#/components/schemas/ToolChoiceAny'
                - $ref: '#/components/schemas/ToolChoiceTool'
                - $ref: '#/components/schemas/ToolChoiceNone'
              discriminator:
                propertyName: type
                mapping:
                  any: '#/components/schemas/ToolChoiceAny'
                  auto: '#/components/schemas/ToolChoiceAuto'
                  none: '#/components/schemas/ToolChoiceNone'
                  tool: '#/components/schemas/ToolChoiceTool'
            - type: 'null'
          title: Tool Choice
          description: >-
            Controls which (if any) tool is called by the model. `none` means the model will not call any tool
            and instead generates a message. `auto` means the model can pick between generating a message or
            calling one or more tools. `required` means the model must call one or more tools. Specifying a
            particular tool via `{"type": "function", "function": {"name": "my_function"}}` forces the model
            to call that tool.  `none` is the default when no tools are present. `auto` is the default if
            tools are present.
          default: auto
        tools:
          anyOf:
            - items:
                oneOf:
                  - $ref: '#/components/schemas/ChatCompletionTool'
                  - $ref: '#/components/schemas/CustomToolChatCompletions'
                discriminator:
                  propertyName: type
                  mapping:
                    custom: '#/components/schemas/CustomToolChatCompletions'
                    function: '#/components/schemas/ChatCompletionTool'
              type: array
            - type: 'null'
          title: Tools
          description: Available tools/functions for the model
        top_k:
          anyOf:
            - type: integer
              minimum: 0
            - type: 'null'
          title: Top K
          description: Top-k sampling parameter
        top_logprobs:
          anyOf:
            - type: integer
              maximum: 8
              minimum: 0
            - type: 'null'
          title: Top Logprobs
          description: >-
            An integer between 0 and 20 specifying the number of most likely tokens to return at each token
            position, each with an associated log probability. `logprobs` must be set to `true` if this
            parameter is used.
        top_p:
          anyOf:
            - type: number
              maximum: 1
              minimum: 0
            - type: 'null'
          title: Top P
          description: Nucleus sampling threshold
          default: 1
        user:
          anyOf:
            - type: string
            - type: 'null'
          title: User
          description: >-
            This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use `prompt_cache_key`
            instead to maintain caching optimizations. A stable identifier for your end-users. Used to boost
            cache hit rates by better bucketing similar requests and  to help OpenAI detect and prevent abuse.
            [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).
        verbosity:
          anyOf:
            - type: string
            - type: 'null'
          title: Verbosity
          description: >-
            Constrains the verbosity of the model's response. Lower values will result in more concise
            responses, while higher values will result in more verbose responses. Currently supported values
            are `low`, `medium`, and `high`.
          default: medium
        web_search_options:
          anyOf:
            - $ref: '#/components/schemas/JSONObject'
            - type: 'null'
          description: >-
            This tool searches the web for relevant results to use in a response. Learn more about the [web
            search tool](https://platform.openai.com/docs/guides/tools-web-search?api-mode=chat).
        cached_content:
          anyOf:
            - type: string
            - type: 'null'
          title: Cached Content
          description: >-
            Optional. The name of the content [cached](https://ai.google.dev/gemini-api/docs/caching) to use
            as context to serve the prediction. Format: `cachedContents/{cachedContent}`
        deferred:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Deferred
          description: >-
            If set to `true`, the request returns a `request_id`. You can then get the deferred response by
            GET `/v1/chat/deferred-completion/{request_id}`.
          default: false
        generation_config:
          anyOf:
            - $ref: '#/components/schemas/JSONObject'
            - type: 'null'
          description: Generation parameters wrapper (Google-specific)
        prompt_mode:
          anyOf:
            - type: string
              const: reasoning
            - type: 'null'
          title: Prompt Mode
          description: >-
            Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the
            system prompt for reasoning models will be used.
        safe_prompt:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Safe Prompt
          description: Whether to inject a safety prompt before all conversations.
          default: false
        safety_settings:
          anyOf:
            - items:
                $ref: '#/components/schemas/SafetySetting'
              type: array
            - type: 'null'
          title: Safety Settings
          description: Safety/content filtering settings (Google-specific)
        search_parameters:
          anyOf:
            - $ref: '#/components/schemas/JSONObject'
            - type: 'null'
          description: >-
            Set the parameters to be used for searched data. If not set, no data will be acquired by the
            model.
        thinking:
          anyOf:
            - oneOf:
                - $ref: '#/components/schemas/ThinkingConfigEnabled'
                - $ref: '#/components/schemas/ThinkingConfigDisabled'
              discriminator:
                propertyName: type
                mapping:
                  disabled: '#/components/schemas/ThinkingConfigDisabled'
                  enabled: '#/components/schemas/ThinkingConfigEnabled'
            - type: 'null'
          title: Thinking
          description: Extended thinking configuration (Anthropic-specific)
        tool_config:
          anyOf:
            - $ref: '#/components/schemas/JSONObject'
            - type: 'null'
          description: Tool calling configuration (Google-specific)
        mcp_servers:
          anyOf:
            - type: string
            - $ref: '#/components/schemas/MCPServerSpec'
            - $ref: '#/components/schemas/MCPServers'
            - type: 'null'
          title: Mcp Servers
          description: >-
            MCP server identifiers. Accepts marketplace slugs, URLs, or MCPServerSpec objects. MCP tools are
            executed server-side and billed separately.
          examples:
            - dedalus-labs/example-server
            - - dedalus-labs/example-server-1
              - dedalus-labs/example-server-2
            - slug: dedalus-labs/example-server-1
              version: v1.0.0
            - url: https://mcp.dedaluslabs.ai/dedalus-labs/example-server-1
            - url: https://mcp.dedaluslabs.ai/dedalus-labs/example-server-2/mcp
        credentials:
          anyOf:
            - $ref: '#/components/schemas/Credential'
            - $ref: '#/components/schemas/MCPCredentials'
            - type: 'null'
          title: Credentials
          description: >-
            Credentials for MCP server authentication. Each credential is matched to servers by connection
            name.
          examples:
            - connection_name: external-service
              values:
                api_key: sk-...
            - - connection_name: service-a
                values:
                  api_key: sk-...
              - connection_name: service-b
                values:
                  token: tok_...
        guardrails:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          title: Guardrails
          description: Content filtering and safety policy configuration.
        handoff_config:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Handoff Config
          description: Configuration for multi-model handoffs.
        model_attributes:
          anyOf:
            - additionalProperties:
                additionalProperties:
                  type: number
                type: object
              type: object
            - type: 'null'
          title: Model Attributes
          description: Model attributes for routing. Maps model IDs to attribute dictionaries with values in [0.0, 1.0].
          examples:
            - gpt-5:
                accuracy: 0.95
                speed: 0.6
        agent_attributes:
          anyOf:
            - additionalProperties:
                type: number
              type: object
            - type: 'null'
          title: Agent Attributes
          description: Agent attributes. Values in [0.0, 1.0].
          examples:
            - accuracy: 0.9
              complexity: 0.8
        max_turns:
          anyOf:
            - type: integer
              maximum: 100
              minimum: 1
            - type: 'null'
          title: Max Turns
          description: Maximum conversation turns.
          examples:
            - 5
            - 10
        automatic_tool_execution:
          type: boolean
          title: Automatic Tool Execution
          description: Execute tools server-side. If false, returns raw tool calls for manual handling.
          default: true
      additionalProperties: true
      type: object
      required:
        - model
      title: ChatCompletionRequest
      description: |-
        ChatCompletion request schema.

        Supports OpenAI-compatible parameters, provider-specific extensions,
        server-side execution, and agent orchestration features.
    ChatCompletionRequestAssistantMessage:
      properties:
        content:
          anyOf:
            - type: string
            - items:
                oneOf:
                  - $ref: '#/components/schemas/ChatCompletionRequestMessageContentPartText'
                  - $ref: '#/components/schemas/ChatCompletionRequestMessageContentPartRefusal'
                discriminator:
                  propertyName: type
                  mapping:
                    refusal: '#/components/schemas/ChatCompletionRequestMessageContentPartRefusal'
                    text: '#/components/schemas/ChatCompletionRequestMessageContentPartText'
              type: array
              minItems: 1
              title: ChatCompletionRequestAssistantMessageContentArray
            - type: 'null'
          title: Content
          description: >-
            The contents of the assistant message. Required unless `tool_calls` or `function_call` is
            specified.
          x-order: 0
        refusal:
          anyOf:
            - type: string
            - type: 'null'
          title: Refusal
          description: The refusal message by the assistant.
          x-order: 1
        role:
          type: string
          const: assistant
          title: Role
          description: The role of the messages author, in this case `assistant`.
          x-order: 2
        name:
          type: string
          title: Name
          description: >-
            An optional name for the participant. Provides the model information to differentiate between
            participants of the same role.
          x-order: 3
        audio:
          anyOf:
            - $ref: '#/components/schemas/Audio'
            - type: 'null'
          description: |-
            Data about a previous audio response from the model.
            [Learn more](https://platform.openai.com/docs/guides/audio).
          x-order: 4
        tool_calls:
          items:
            oneOf:
              - $ref: '#/components/schemas/ChatCompletionMessageToolCall'
              - $ref: '#/components/schemas/ChatCompletionMessageCustomToolCall'
            discriminator:
              propertyName: type
              mapping:
                custom: '#/components/schemas/ChatCompletionMessageCustomToolCall'
                function: '#/components/schemas/ChatCompletionMessageToolCall'
          type: array
          title: Tool Calls
          description: The tool calls generated by the model, such as function calls.
          x-order: 5
        function_call:
          anyOf:
            - $ref: '#/components/schemas/FunctionCall'
            - type: 'null'
          description: >-
            Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be
            called, as generated by the model.
          x-order: 6
      type: object
      required:
        - role
      title: ChatCompletionRequestAssistantMessage
      description: >-
        Messages sent by the model in response to user messages.


        Fields:

        - content (optional): str | Annotated[list[ChatCompletionRequestAssistantMessageContentPart],
        MinLen(1), ArrayTitle("ChatCompletionRequestAssistantMessageContentArray")] | None

        - refusal (optional): str | None

        - role (required): Literal["assistant"]

        - name (optional): str

        - audio (optional): Audio | None

        - tool_calls (optional): ChatCompletionMessageToolCalls

        - function_call (optional): FunctionCall | None
    ChatCompletionRequestDeveloperMessage:
      properties:
        content:
          anyOf:
            - type: string
            - items:
                $ref: '#/components/schemas/ChatCompletionRequestMessageContentPartText'
              type: array
              minItems: 1
              title: ChatCompletionRequestDeveloperMessageContentArray
          title: Content
          description: The contents of the developer message.
          x-order: 0
        role:
          type: string
          const: developer
          title: Role
          description: The role of the messages author, in this case `developer`.
          x-order: 1
        name:
          type: string
          title: Name
          description: >-
            An optional name for the participant. Provides the model information to differentiate between
            participants of the same role.
          x-order: 2
      type: object
      required:
        - content
        - role
      title: ChatCompletionRequestDeveloperMessage
      description: >-
        Developer-provided instructions that the model should follow, regardless of

        messages sent by the user. With o1 models and newer, `developer` messages

        replace the previous `system` messages.


        Fields:

        - content (required): str | Annotated[list[ChatCompletionRequestMessageContentPartText], MinLen(1),
        ArrayTitle("ChatCompletionRequestDeveloperMessageContentArray")]

        - role (required): Literal["developer"]

        - name (optional): str
    ChatCompletionRequestFunctionMessage:
      properties:
        role:
          type: string
          const: function
          title: Role
          description: The role of the messages author, in this case `function`.
          x-order: 0
        content:
          anyOf:
            - type: string
            - type: 'null'
          title: Content
          description: The contents of the function message.
          x-order: 1
        name:
          type: string
          title: Name
          description: The name of the function to call.
          x-order: 2
      type: object
      required:
        - role
        - content
        - name
      title: ChatCompletionRequestFunctionMessage
      description: |-
        Schema for ChatCompletionRequestFunctionMessage.

        Fields:
        - role (required): Literal["function"]
        - content (required): str | None
        - name (required): str
    ChatCompletionRequestMessageContentPartAudio:
      properties:
        type:
          type: string
          const: input_audio
          title: Type
          description: The type of the content part. Always `input_audio`.
          x-order: 0
        input_audio:
          properties:
            data:
              type: string
              title: Data
              description: Base64 encoded audio data.
              x-order: 0
            format:
              type: string
              enum:
                - wav
                - mp3
              title: Format
              description: The format of the encoded audio data. Currently supports "wav" and "mp3".
              x-order: 1
          type: object
          required:
            - data
            - format
          description: |-
            Schema for InputAudio.

            Fields:
            - data (required): str
            - format (required): Literal["wav", "mp3"]
      type: object
      required:
        - type
        - input_audio
      title: ChatCompletionRequestMessageContentPartAudio
      description: |-
        Learn about [audio inputs](https://platform.openai.com/docs/guides/audio).

        Fields:
        - type (required): Literal["input_audio"]
        - input_audio (required): InputAudio
    ChatCompletionRequestMessageContentPartFile:
      properties:
        type:
          type: string
          const: file
          title: Type
          description: The type of the content part. Always `file`.
          x-order: 0
        file:
          properties:
            filename:
              type: string
              title: Filename
              description: |-
                The name of the file, used when passing the file to the model as a 
                string.
              x-order: 0
            file_data:
              type: string
              title: File Data
              description: |-
                The base64 encoded file data, used when passing the file to the model 
                as a string.
              x-order: 1
            file_id:
              type: string
              title: File Id
              description: The ID of an uploaded file to use as input.
              x-order: 2
          type: object
          description: |-
            Schema for File.

            Fields:
            - filename (optional): str
            - file_data (optional): str
            - file_id (optional): str
      type: object
      required:
        - type
        - file
      title: ChatCompletionRequestMessageContentPartFile
      description: |-
        Learn about [file inputs](https://platform.openai.com/docs/guides/text) for text generation.

        Fields:
        - type (required): Literal["file"]
        - file (required): File
    ChatCompletionRequestMessageContentPartImage:
      properties:
        type:
          type: string
          const: image_url
          title: Type
          description: The type of the content part.
          x-order: 0
        image_url:
          properties:
            url:
              type: string
              minLength: 1
              format: uri
              title: Url
              description: Either a URL of the image or the base64 encoded image data.
              x-order: 0
            detail:
              type: string
              enum:
                - auto
                - low
                - high
              title: Detail
              description: >-
                Specifies the detail level of the image. Learn more in the [Vision
                guide](https://platform.openai.com/docs/guides/vision#low-or-high-fidelity-image-understanding).
              default: auto
              x-order: 1
          type: object
          required:
            - url
          description: |-
            Schema for ImageUrl.

            Fields:
            - url (required): AnyUrl
            - detail (optional): Literal["auto", "low", "high"]
      type: object
      required:
        - type
        - image_url
      title: ChatCompletionRequestMessageContentPartImage
      description: |-
        Learn about [image inputs](https://platform.openai.com/docs/guides/vision).

        Fields:
        - type (required): Literal["image_url"]
        - image_url (required): ImageUrl
    ChatCompletionRequestMessageContentPartRefusal:
      properties:
        type:
          type: string
          const: refusal
          title: Type
          description: The type of the content part.
          x-order: 0
        refusal:
          type: string
          title: Refusal
          description: The refusal message generated by the model.
          x-order: 1
      type: object
      required:
        - type
        - refusal
      title: ChatCompletionRequestMessageContentPartRefusal
      description: |-
        Schema for ChatCompletionRequestMessageContentPartRefusal.

        Fields:
        - type (required): Literal["refusal"]
        - refusal (required): str
    ChatCompletionRequestMessageContentPartText:
      properties:
        type:
          type: string
          const: text
          title: Type
          description: The type of the content part.
          x-order: 0
        text:
          type: string
          title: Text
          description: The text content.
          x-order: 1
      type: object
      required:
        - type
        - text
      title: ChatCompletionRequestMessageContentPartText
      description: |-
        Learn about [text inputs](https://platform.openai.com/docs/guides/text-generation).

        Fields:
        - type (required): Literal["text"]
        - text (required): str
    ChatCompletionRequestSystemMessage:
      properties:
        content:
          anyOf:
            - type: string
            - items:
                $ref: '#/components/schemas/ChatCompletionRequestMessageContentPartText'
              type: array
              minItems: 1
              title: ChatCompletionRequestSystemMessageContentArray
          title: Content
          description: The contents of the system message.
          x-order: 0
        role:
          type: string
          const: system
          title: Role
          description: The role of the messages author, in this case `system`.
          x-order: 1
        name:
          type: string
          title: Name
          description: >-
            An optional name for the participant. Provides the model information to differentiate between
            participants of the same role.
          x-order: 2
      type: object
      required:
        - content
        - role
      title: ChatCompletionRequestSystemMessage
      description: >-
        Developer-provided instructions that the model should follow, regardless of

        messages sent by the user. With o1 models and newer, use `developer` messages

        for this purpose instead.


        Fields:

        - content (required): str | Annotated[list[ChatCompletionRequestSystemMessageContentPart], MinLen(1),
        ArrayTitle("ChatCompletionRequestSystemMessageContentArray")]

        - role (required): Literal["system"]

        - name (optional): str
    ChatCompletionRequestToolMessage:
      properties:
        role:
          type: string
          const: tool
          title: Role
          description: The role of the messages author, in this case `tool`.
          x-order: 0
        content:
          anyOf:
            - type: string
            - items:
                $ref: '#/components/schemas/ChatCompletionRequestMessageContentPartText'
              type: array
              minItems: 1
              title: ChatCompletionRequestToolMessageContentArray
          title: Content
          description: The contents of the tool message.
          x-order: 1
        tool_call_id:
          type: string
          title: Tool Call Id
          description: Tool call that this message is responding to.
          x-order: 2
      type: object
      required:
        - role
        - content
        - tool_call_id
      title: ChatCompletionRequestToolMessage
      description: >-
        Schema for ChatCompletionRequestToolMessage.


        Fields:

        - role (required): Literal["tool"]

        - content (required): str | Annotated[list[ChatCompletionRequestToolMessageContentPart], MinLen(1),
        ArrayTitle("ChatCompletionRequestToolMessageContentArray")]

        - tool_call_id (required): str
    ChatCompletionRequestUserMessage:
      properties:
        content:
          anyOf:
            - type: string
            - items:
                oneOf:
                  - $ref: '#/components/schemas/ChatCompletionRequestMessageContentPartText'
                  - $ref: '#/components/schemas/ChatCompletionRequestMessageContentPartImage'
                  - $ref: '#/components/schemas/ChatCompletionRequestMessageContentPartAudio'
                  - $ref: '#/components/schemas/ChatCompletionRequestMessageContentPartFile'
                discriminator:
                  propertyName: type
                  mapping:
                    file: '#/components/schemas/ChatCompletionRequestMessageContentPartFile'
                    image_url: '#/components/schemas/ChatCompletionRequestMessageContentPartImage'
                    input_audio: '#/components/schemas/ChatCompletionRequestMessageContentPartAudio'
                    text: '#/components/schemas/ChatCompletionRequestMessageContentPartText'
              type: array
              minItems: 1
              title: ChatCompletionRequestUserMessageContentArray
          title: Content
          description: The contents of the user message.
          x-order: 0
        role:
          type: string
          const: user
          title: Role
          description: The role of the messages author, in this case `user`.
          x-order: 1
        name:
          type: string
          title: Name
          description: >-
            An optional name for the participant. Provides the model information to differentiate between
            participants of the same role.
          x-order: 2
      type: object
      required:
        - content
        - role
      title: ChatCompletionRequestUserMessage
      description: >-
        Messages sent by an end user, containing prompts or additional context

        information.


        Fields:

        - content (required): str | Annotated[list[ChatCompletionRequestUserMessageContentPart], MinLen(1),
        ArrayTitle("ChatCompletionRequestUserMessageContentArray")]

        - role (required): Literal["user"]

        - name (optional): str
    ChatCompletionResponseMessage:
      properties:
        content:
          anyOf:
            - type: string
            - type: 'null'
          title: Content
          description: The contents of the message.
          x-order: 0
        refusal:
          anyOf:
            - type: string
            - type: 'null'
          title: Refusal
          description: The refusal message generated by the model.
          x-order: 1
        tool_calls:
          items:
            oneOf:
              - $ref: '#/components/schemas/ChatCompletionMessageToolCall'
              - $ref: '#/components/schemas/ChatCompletionMessageCustomToolCall'
            discriminator:
              propertyName: type
              mapping:
                custom: '#/components/schemas/ChatCompletionMessageCustomToolCall'
                function: '#/components/schemas/ChatCompletionMessageToolCall'
          type: array
          title: Tool Calls
          description: The tool calls generated by the model, such as function calls.
          x-order: 2
        annotations:
          items:
            properties:
              type:
                type: string
                const: url_citation
                title: Type
                description: The type of the URL citation. Always `url_citation`.
                x-order: 0
              url_citation:
                properties:
                  end_index:
                    type: integer
                    title: End Index
                    description: The index of the last character of the URL citation in the message.
                    x-order: 0
                  start_index:
                    type: integer
                    title: Start Index
                    description: The index of the first character of the URL citation in the message.
                    x-order: 1
                  url:
                    type: string
                    title: Url
                    description: The URL of the web resource.
                    x-order: 2
                  title:
                    type: string
                    title: Title
                    description: The title of the web resource.
                    x-order: 3
                type: object
                required:
                  - end_index
                  - start_index
                  - url
                  - title
                description: |-
                  A URL citation when using web search.

                  Fields:
                  - end_index (required): int
                  - start_index (required): int
                  - url (required): str
                  - title (required): str
            type: object
            required:
              - type
              - url_citation
            description: |-
              A URL citation when using web search.

              Fields:
              - type (required): Literal["url_citation"]
              - url_citation (required): UrlCitation
          type: array
          title: Annotations
          description: |-
            Annotations for the message, when applicable, as when using the
            [web search tool](https://platform.openai.com/docs/guides/tools-web-search?api-mode=chat).
          x-order: 3
        role:
          type: string
          const: assistant
          title: Role
          description: The role of the author of this message.
          x-order: 4
        function_call:
          properties:
            arguments:
              type: string
              title: Arguments
              description: >-
                The arguments to call the function with, as generated by the model in JSON format. Note that
                the model does not always generate valid JSON, and may hallucinate parameters not defined by
                your function schema. Validate the arguments in your code before calling your function.
              x-order: 0
            name:
              type: string
              title: Name
              description: The name of the function to call.
              x-order: 1
          type: object
          required:
            - arguments
            - name
          description: >-
            Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be
            called, as generated by the model.


            Fields:

            - arguments (required): str

            - name (required): str
        audio:
          anyOf:
            - properties:
                id:
                  type: string
                  title: Id
                  description: Unique identifier for this audio response.
                  x-order: 0
                expires_at:
                  type: integer
                  title: Expires At
                  description: |-
                    The Unix timestamp (in seconds) for when this audio response will
                    no longer be accessible on the server for use in multi-turn
                    conversations.
                  x-order: 1
                data:
                  type: string
                  title: Data
                  description: |-
                    Base64 encoded audio bytes generated by the model, in the format
                    specified in the request.
                  x-order: 2
                transcript:
                  type: string
                  title: Transcript
                  description: Transcript of the audio generated by the model.
                  x-order: 3
              type: object
              required:
                - id
                - expires_at
                - data
                - transcript
              description: >-
                If the audio output modality is requested, this object contains data

                about the audio response from the model. [Learn
                more](https://platform.openai.com/docs/guides/audio).


                Fields:

                - id (required): str

                - expires_at (required): int

                - data (required): str

                - transcript (required): str
            - type: 'null'
          description: >-
            If the audio output modality is requested, this object contains data

            about the audio response from the model. [Learn
            more](https://platform.openai.com/docs/guides/audio).
          x-order: 6
      type: object
      required:
        - content
        - refusal
        - role
      title: ChatCompletionResponseMessage
      description: |-
        A chat completion message generated by the model.

        Fields:
        - content (required): str | None
        - refusal (required): str | None
        - tool_calls (optional): ChatCompletionMessageToolCalls
        - annotations (optional): list[AnnotationsItem]
        - role (required): Literal["assistant"]
        - function_call (optional): ChatCompletionResponseMessageFunctionCall
        - audio (optional): ChatCompletionResponseMessageAudio | None
    ChatCompletionTokenLogprob:
      properties:
        token:
          type: string
          title: Token
          description: The token.
          x-order: 0
        logprob:
          type: number
          title: Logprob
          description: >-
            The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the
            value `-9999.0` is used to signify that the token is very unlikely.
          x-order: 1
        bytes:
          anyOf:
            - items:
                type: integer
              type: array
            - type: 'null'
          title: Bytes
          description: >-
            A list of integers representing the UTF-8 bytes representation of the token. Useful in instances
            where characters are represented by multiple tokens and their byte representations must be
            combined to generate the correct text representation. Can be `null` if there is no bytes
            representation for the token.
          x-order: 2
        top_logprobs:
          items:
            properties:
              token:
                type: string
                title: Token
                description: The token.
                x-order: 0
              logprob:
                type: number
                title: Logprob
                description: >-
                  The log probability of this token, if it is within the top 20 most likely tokens. Otherwise,
                  the value `-9999.0` is used to signify that the token is very unlikely.
                x-order: 1
              bytes:
                anyOf:
                  - items:
                      type: integer
                    type: array
                  - type: 'null'
                title: Bytes
                description: >-
                  A list of integers representing the UTF-8 bytes representation of the token. Useful in
                  instances where characters are represented by multiple tokens and their byte representations
                  must be combined to generate the correct text representation. Can be `null` if there is no
                  bytes representation for the token.
                x-order: 2
            type: object
            required:
              - token
              - logprob
              - bytes
            description: Token and its log probability.
          type: array
          title: Top Logprobs
          description: >-
            List of the most likely tokens and their log probability, at this token position. In rare cases,
            there may be fewer than the number of requested `top_logprobs` returned.
          x-order: 3
      type: object
      required:
        - token
        - logprob
        - bytes
        - top_logprobs
      title: ChatCompletionTokenLogprob
      description: Token log probability information.
    ChatCompletionTool:
      properties:
        type:
          type: string
          const: function
          title: Type
          description: The type of the tool. Currently, only `function` is supported.
          x-order: 0
        function:
          $ref: '#/components/schemas/FunctionObject'
          x-order: 1
      type: object
      required:
        - type
        - function
      title: ChatCompletionTool
      description: |-
        A function tool that can be used to generate a response.

        Fields:
        - type (required): Literal["function"]
        - function (required): FunctionObject
    Choice:
      properties:
        finish_reason:
          anyOf:
            - type: string
              enum:
                - stop
                - length
                - tool_calls
                - content_filter
                - function_call
            - type: 'null'
          title: Finish Reason
          description: >-
            The reason the model stopped generating tokens. This will be `stop` if the model hit a natural
            stop point or a provided stop sequence,

            `length` if the maximum number of tokens specified in the request was reached,

            `content_filter` if content was omitted due to a flag from our content filters,

            `tool_calls` if the model called a tool, or `function_call` (deprecated) if the model called a
            function.
          x-order: 0
        index:
          type: integer
          title: Index
          description: The index of the choice in the list of choices.
          x-order: 1
        message:
          $ref: '#/components/schemas/ChatCompletionResponseMessage'
          description: A chat completion message generated by the model.
          x-order: 2
        logprobs:
          anyOf:
            - $ref: '#/components/schemas/ChoiceLogprobs'
            - type: 'null'
          description: Log probability information for the choice.
          x-order: 3
      type: object
      required:
        - index
        - message
      title: Choice
      description: |-
        A chat completion choice.

        OpenAI-compatible choice object for non-streaming responses.
        Part of the ChatCompletion response.
      x-ddls-inline: true
    ChoiceLogprobs:
      properties:
        content:
          anyOf:
            - items:
                $ref: '#/components/schemas/ChatCompletionTokenLogprob'
              type: array
            - type: 'null'
          title: Content
          description: A list of message content tokens with log probability information.
          x-order: 0
        refusal:
          anyOf:
            - items:
                $ref: '#/components/schemas/ChatCompletionTokenLogprob'
              type: array
            - type: 'null'
          title: Refusal
          description: A list of message refusal tokens with log probability information.
          x-order: 1
      type: object
      title: ChoiceLogprobs
      description: Log probability information for the choice.
      x-ddls-inline: true
    CompletionTokensDetails:
      properties:
        accepted_prediction_tokens:
          type: integer
          title: Accepted Prediction Tokens
          description: |-
            When using Predicted Outputs, the number of tokens in the
            prediction that appeared in the completion.
          default: 0
          x-order: 0
        audio_tokens:
          type: integer
          title: Audio Tokens
          description: Audio input tokens generated by the model.
          default: 0
          x-order: 1
        reasoning_tokens:
          type: integer
          title: Reasoning Tokens
          description: Tokens generated by the model for reasoning.
          default: 0
          x-order: 2
        rejected_prediction_tokens:
          type: integer
          title: Rejected Prediction Tokens
          description: |-
            When using Predicted Outputs, the number of tokens in the
            prediction that did not appear in the completion. However, like
            reasoning tokens, these tokens are still counted in the total
            completion tokens for purposes of billing, output, and context window
            limits.
          default: 0
          x-order: 3
      type: object
      title: CompletionTokensDetails
      description: |-
        Breakdown of tokens used in a completion.

        Fields:
        - accepted_prediction_tokens (optional): int
        - audio_tokens (optional): int
        - reasoning_tokens (optional): int
        - rejected_prediction_tokens (optional): int
      x-ddls-inline: true
    CompletionUsage:
      properties:
        completion_tokens:
          type: integer
          title: Completion Tokens
          description: Number of tokens in the generated completion.
          x-order: 0
        prompt_tokens:
          type: integer
          title: Prompt Tokens
          description: Number of tokens in the prompt.
          x-order: 1
        total_tokens:
          type: integer
          title: Total Tokens
          description: Total number of tokens used in the request (prompt + completion).
          x-order: 2
        completion_tokens_details:
          $ref: '#/components/schemas/CompletionTokensDetails'
          description: Breakdown of tokens used in a completion.
          x-order: 3
        prompt_tokens_details:
          $ref: '#/components/schemas/PromptTokensDetails'
          description: Breakdown of tokens used in the prompt.
          x-order: 4
      type: object
      required:
        - completion_tokens
        - prompt_tokens
        - total_tokens
      title: CompletionUsage
      description: |-
        Usage statistics for the completion request.

        Fields:
        - completion_tokens (required): int
        - prompt_tokens (required): int
        - total_tokens (required): int
        - completion_tokens_details (optional): CompletionTokensDetails
        - prompt_tokens_details (optional): PromptTokensDetails
    CreateChatCompletionRequestAudio:
      properties:
        voice:
          anyOf:
            - type: string
            - type: string
              enum:
                - alloy
                - ash
                - ballad
                - coral
                - echo
                - sage
                - shimmer
                - verse
                - marin
                - cedar
          title: Voice
          description: |-
            The voice the model uses to respond. Supported voices are
            `alloy`, `ash`, `ballad`, `coral`, `echo`, `fable`, `nova`, `onyx`, `sage`, and `shimmer`.
          x-order: 0
        format:
          type: string
          enum:
            - wav
            - aac
            - mp3
            - flac
            - opus
            - pcm16
          title: Format
          description: |-
            Specifies the output audio format. Must be one of `wav`, `mp3`, `flac`,
            `opus`, or `pcm16`.
          x-order: 1
      type: object
      required:
        - voice
        - format
      title: CreateChatCompletionRequestAudio
      description: |-
        Parameters for audio output. Required when audio output is requested with
        `modalities: ["audio"]`. [Learn more](https://platform.openai.com/docs/guides/audio).

        Fields:
        - voice (required): VoiceIdsShared
        - format (required): Literal["wav", "aac", "mp3", "flac", "opus", "pcm16"]
      x-ddls-inline: true
    CreateEmbeddingRequest:
      properties:
        input:
          anyOf:
            - type: string
            - items:
                type: string
              type: array
              maxItems: 2048
              minItems: 1
              title: CreateEmbeddingRequestInputArray
            - items:
                type: integer
              type: array
              maxItems: 2048
              minItems: 1
              title: CreateEmbeddingRequestInputArray
            - items:
                items:
                  type: integer
                type: array
                minItems: 1
                title: CreateEmbeddingRequestInputItemArray
              type: array
              maxItems: 2048
              minItems: 1
              title: CreateEmbeddingRequestInputArray
          title: Input
          description: >-
            Input text to embed, encoded as a string or array of tokens. To embed multiple inputs in a single
            request, pass an array of strings or array of token arrays. The input must not exceed the max
            input tokens for the model (8192 tokens for all embedding models), cannot be an empty string, and
            any array must be 2048 dimensions or less. [Example Python
            code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken) for counting tokens.
            In addition to the per-input token limit, all embedding  models enforce a maximum of 300,000
            tokens summed across all inputs in a  single request.
          x-order: 0
        model:
          anyOf:
            - type: string
            - type: string
              enum:
                - text-embedding-ada-002
                - text-embedding-3-small
                - text-embedding-3-large
          title: Model
          description: >-
            ID of the model to use. You can use the [List
            models](https://platform.openai.com/docs/api-reference/models/list) API to see all of your
            available models, or see our [Model overview](https://platform.openai.com/docs/models) for
            descriptions of them.
          x-order: 1
        encoding_format:
          type: string
          enum:
            - float
            - base64
          title: Encoding Format
          description: >-
            The format to return the embeddings in. Can be either `float` or
            [`base64`](https://pypi.org/project/pybase64/).
          default: float
          x-order: 2
        dimensions:
          type: integer
          minimum: 1
          title: Dimensions
          description: >-
            The number of dimensions the resulting output embeddings should have. Only supported in
            `text-embedding-3` and later models.
          x-order: 3
        user:
          type: string
          title: User
          description: >-
            A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse.
            [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids).
          x-order: 4
      type: object
      required:
        - input
        - model
      title: CreateEmbeddingRequest
      description: >-
        Schema for CreateEmbeddingRequest.


        Fields:

        - input (required): str | Annotated[list[str], MinLen(1), MaxLen(2048),
        ArrayTitle("CreateEmbeddingRequestInputArray")] | Annotated[list[int], MinLen(1), MaxLen(2048),
        ArrayTitle("CreateEmbeddingRequestInputArray")] | Annotated[list[Annotated[list[int], MinLen(1),
        ArrayTitle("CreateEmbeddingRequestInputItemArray")]], MinLen(1), MaxLen(2048),
        ArrayTitle("CreateEmbeddingRequestInputArray")]

        - model (required): str | Literal["text-embedding-ada-002", "text-embedding-3-small",
        "text-embedding-3-large"]

        - encoding_format (optional): Literal["float", "base64"]

        - dimensions (optional): int

        - user (optional): str
    CreateEmbeddingResponse:
      properties:
        object:
          type: string
          const: list
          title: Object
          description: Object type, always 'list'
          default: list
        data:
          items:
            $ref: '#/components/schemas/Embedding'
          type: array
          title: Data
          description: List of embedding objects
        model:
          type: string
          title: Model
          description: The model used for embeddings
        usage:
          additionalProperties:
            type: integer
          type: object
          title: Usage
          description: Usage statistics (prompt_tokens, total_tokens)
      type: object
      required:
        - data
        - model
        - usage
      title: CreateEmbeddingResponse
      description: Response from embeddings endpoint.
    CreateSpeechRequest:
      properties:
        model:
          type: string
          title: Model
          description: >-
            One of the available [TTS models](https://platform.openai.com/docs/models#tts): `openai/tts-1`,
            `openai/tts-1-hd` or `openai/gpt-4o-mini-tts`.
          examples:
            - openai/tts-1
            - openai/tts-1-hd
        input:
          type: string
          title: Input
          description: The text to generate audio for. The maximum length is 4096 characters.
          examples:
            - Hello, how are you today?
        voice:
          type: string
          enum:
            - alloy
            - ash
            - ballad
            - coral
            - echo
            - fable
            - onyx
            - nova
            - sage
            - shimmer
            - verse
          title: Voice
          description: >-
            The voice to use when generating the audio. Supported voices are `alloy`, `ash`, `ballad`,
            `coral`, `echo`, `fable`, `onyx`, `nova`, `sage`, `shimmer`, and `verse`. Previews of the voices
            are available in the [Text to speech
            guide](https://platform.openai.com/docs/guides/text-to-speech#voice-options).
          examples:
            - alloy
            - nova
        instructions:
          anyOf:
            - type: string
            - type: 'null'
          title: Instructions
          description: >-
            Control the voice of your generated audio with additional instructions. Does not work with `tts-1`
            or `tts-1-hd`.
        response_format:
          anyOf:
            - type: string
              enum:
                - mp3
                - opus
                - aac
                - flac
                - wav
                - pcm
            - type: 'null'
          title: Response Format
          description: The format to audio in. Supported formats are `mp3`, `opus`, `aac`, `flac`, `wav`, and `pcm`.
          examples:
            - mp3
            - wav
        speed:
          anyOf:
            - type: number
              maximum: 4
              minimum: 0.25
            - type: 'null'
          title: Speed
          description: The speed of the generated audio. Select a value from `0.25` to `4.0`. `1.0` is the default.
          examples:
            - 1
            - 1.5
        stream_format:
          anyOf:
            - type: string
              enum:
                - sse
                - audio
            - type: 'null'
          title: Stream Format
          description: >-
            The format to stream the audio in. Supported formats are `sse` and `audio`. `sse` is not supported
            for `tts-1` or `tts-1-hd`.
          examples:
            - sse
            - audio
      type: object
      required:
        - model
        - input
        - voice
      title: CreateSpeechRequest
      description: Request to generate audio from text.
    CreateTranscriptionResponseJson:
      properties:
        text:
          type: string
          title: Text
          description: The transcribed text.
          x-order: 0
        logprobs:
          items:
            $ref: '#/components/schemas/LogprobsItem'
          type: array
          title: Logprobs
          description: >-
            The log probabilities of the tokens in the transcription. Only returned with the models
            `gpt-4o-transcribe` and `gpt-4o-mini-transcribe` if `logprobs` is added to the `include` array.
          x-order: 1
        usage:
          oneOf:
            - $ref: '#/components/schemas/TranscriptTextUsageTokens'
            - $ref: '#/components/schemas/TranscriptTextUsageDuration'
          title: Usage
          description: Token usage statistics for the request.
          discriminator:
            propertyName: type
            mapping:
              duration: '#/components/schemas/TranscriptTextUsageDuration'
              tokens: '#/components/schemas/TranscriptTextUsageTokens'
          x-order: 2
      type: object
      required:
        - text
      title: CreateTranscriptionResponseJson
      description: |-
        Represents a transcription response returned by model, based on the provided input.

        Fields:
          - text (required): str
          - logprobs (optional): list[LogprobsItem]
          - usage (optional): Usage
    CreateTranscriptionResponseVerboseJson:
      properties:
        language:
          type: string
          title: Language
          description: The language of the input audio.
          x-order: 0
        duration:
          type: number
          title: Duration
          description: The duration of the input audio.
          x-order: 1
        text:
          type: string
          title: Text
          description: The transcribed text.
          x-order: 2
        words:
          items:
            $ref: '#/components/schemas/TranscriptionWord'
          type: array
          title: Words
          description: Extracted words and their corresponding timestamps.
          x-order: 3
        segments:
          items:
            $ref: '#/components/schemas/TranscriptionSegment'
          type: array
          title: Segments
          description: Segments of the transcribed text and their corresponding details.
          x-order: 4
        usage:
          $ref: '#/components/schemas/TranscriptTextUsageDuration'
          description: Usage statistics for models billed by audio input duration.
          x-order: 5
      type: object
      required:
        - language
        - duration
        - text
      title: CreateTranscriptionResponseVerboseJson
      description: |-
        Represents a verbose json transcription response returned by model, based on the provided input.

        Fields:
          - language (required): str
          - duration (required): float
          - text (required): str
          - words (optional): list[TranscriptionWord]
          - segments (optional): list[TranscriptionSegment]
          - usage (optional): TranscriptTextUsageDuration
    CreateTranslationResponseJson:
      properties:
        text:
          type: string
          title: Text
          x-order: 0
      type: object
      required:
        - text
      title: CreateTranslationResponseJson
      description: |-
        Fields:
        - text (required): str
    CreateTranslationResponseVerboseJson:
      properties:
        language:
          type: string
          title: Language
          description: The language of the output translation (always `english`).
          x-order: 0
        duration:
          type: number
          title: Duration
          description: The duration of the input audio.
          x-order: 1
        text:
          type: string
          title: Text
          description: The translated text.
          x-order: 2
        segments:
          items:
            $ref: '#/components/schemas/TranscriptionSegment'
          type: array
          title: Segments
          description: Segments of the translated text and their corresponding details.
          x-order: 3
      type: object
      required:
        - language
        - duration
        - text
      title: CreateTranslationResponseVerboseJson
      description: |-
        Fields:
        - language (required): str
        - duration (required): float
        - text (required): str
        - segments (optional): list[TranscriptionSegment]
    Credential:
      properties:
        connection_name:
          type: string
          title: Connection Name
          description: Connection name. Must match a connection in MCPServer.connections.
        values:
          additionalProperties:
            anyOf:
              - type: string
              - type: integer
              - type: boolean
          type: object
          title: Values
          description: Credential values. Keys are credential field names, values are the secrets.
      additionalProperties: false
      type: object
      required:
        - connection_name
        - values
      title: Credential
      description: |-
        Credential for MCP server authentication.

        Passed at endpoint level (e.g., chat.completions.create) and matched
        to MCP servers by connection name. Wire format matches dedalus_mcp.Credential.to_dict().
    CustomToolChatCompletions:
      properties:
        type:
          type: string
          const: custom
          title: Type
          description: The type of the custom tool. Always `custom`.
          x-order: 0
        custom:
          $ref: '#/components/schemas/CustomToolProperties'
          description: Properties of the custom tool.
          x-order: 1
      type: object
      required:
        - type
        - custom
      title: CustomToolChatCompletions
      description: |-
        A custom tool that processes input using a specified format.

        Fields:
        - type (required): Literal["custom"]
        - custom (required): CustomToolProperties
    CustomToolProperties:
      properties:
        name:
          type: string
          title: Name
          description: The name of the custom tool, used to identify it in tool calls.
          x-order: 0
        description:
          type: string
          title: Description
          description: Optional description of the custom tool, used to provide more context.
          x-order: 1
        format:
          oneOf:
            - $ref: '#/components/schemas/TextFormat'
            - $ref: '#/components/schemas/GrammarFormat'
          title: Format
          description: The input format for the custom tool. Default is unconstrained text.
          discriminator:
            propertyName: type
            mapping:
              grammar: '#/components/schemas/GrammarFormat'
              text: '#/components/schemas/TextFormat'
          x-order: 2
      type: object
      required:
        - name
      title: CustomToolProperties
      description: |-
        Properties of the custom tool.

        Fields:
        - name (required): str
        - description (optional): str
        - format (optional): FormatUnion_ecfe4be0
      x-ddls-inline: true
    DedalusModel:
      properties:
        model:
          type: string
          title: Model
          description: Model identifier with provider prefix (e.g., 'openai/gpt-5', 'anthropic/claude-3-5-sonnet').
        settings:
          anyOf:
            - $ref: '#/components/schemas/ModelSettings'
            - type: 'null'
          description: >-
            Optional default generation settings (e.g., temperature, max_tokens) applied when this model is
            selected.
      additionalProperties: false
      type: object
      required:
        - model
      title: DedalusModel
      description: |-
        Structured model selection entry used in request payloads.

        Supports OpenAI-style semantics (string model id) while enabling
        optional per-model default settings for Dedalus multi-model routing.
    DedalusModelChoice:
      anyOf:
        - $ref: '#/components/schemas/ModelId'
        - $ref: '#/components/schemas/DedalusModel'
      title: DedalusModelChoice
      description: Dedalus model choice - either a string ID or DedalusModel configuration object.
    Embedding:
      properties:
        object:
          type: string
          const: embedding
          title: Object
          description: Object type, always 'embedding'
          default: embedding
        embedding:
          anyOf:
            - items:
                type: number
              type: array
            - type: string
          title: Embedding
          description: The embedding vector (float array or base64 string)
        index:
          type: integer
          title: Index
          description: Index of the embedding in the list
      type: object
      required:
        - embedding
        - index
      title: Embedding
      description: Single embedding object.
    FunctionCall:
      properties:
        arguments:
          type: string
          title: Arguments
          description: >-
            The arguments to call the function with, as generated by the model in JSON format. Note that the
            model does not always generate valid JSON, and may hallucinate parameters not defined by your
            function schema. Validate the arguments in your code before calling your function.
          x-order: 0
        name:
          type: string
          title: Name
          description: The name of the function to call.
          x-order: 1
      type: object
      required:
        - arguments
        - name
      title: FunctionCall
      description: >-
        Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called,
        as generated by the model.


        Fields:

        - arguments (required): str

        - name (required): str
      x-ddls-inline: true
    FunctionCallFunctionCallMode:
      type: string
      title: function call mode
      description: 'Wrapper for union variant: function call mode.'
    FunctionObject:
      properties:
        description:
          type: string
          title: Description
          description: >-
            A description of what the function does, used by the model to choose when and how to call the
            function.
          x-order: 0
        name:
          type: string
          title: Name
          description: >-
            The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes,
            with a maximum length of 64.
          x-order: 1
        parameters:
          $ref: '#/components/schemas/JSONObject'
          description: >-
            The parameters the functions accepts, described as a JSON Schema object. See the
            [guide](https://platform.openai.com/docs/guides/function-calling) for examples, and the [JSON
            Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the
            format. 


            Omitting `parameters` defines a function with an empty parameter list.
          x-order: 2
        strict:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Strict
          description: >-
            Whether to enable strict schema adherence when generating the function call. If set to true, the
            model will follow the exact schema defined in the `parameters` field. Only a subset of JSON Schema
            is supported when `strict` is `true`. Learn more about Structured Outputs in the [function calling
            guide](https://platform.openai.com/docs/guides/function-calling).
          x-order: 3
      type: object
      required:
        - name
      title: FunctionObject
      description: |-
        Schema for FunctionObject.

        Fields:
        - description (optional): str
        - name (required): str
        - parameters (optional): FunctionParameters
        - strict (optional): bool | None
    GrammarFormat:
      properties:
        type:
          type: string
          const: grammar
          title: Type
          description: Grammar format. Always `grammar`.
          x-order: 0
        grammar:
          properties:
            definition:
              type: string
              title: Definition
              description: The grammar definition.
              x-order: 0
            syntax:
              type: string
              enum:
                - lark
                - regex
              title: Syntax
              description: The syntax of the grammar definition. One of `lark` or `regex`.
              x-order: 1
          type: object
          required:
            - definition
            - syntax
          description: |-
            Your chosen grammar.

            Fields:
            - definition (required): str
            - syntax (required): Literal["lark", "regex"]
      type: object
      required:
        - type
        - grammar
      title: GrammarFormat
      description: |-
        A grammar defined by the user.

        Fields:
        - type (required): Literal["grammar"]
        - grammar (required): GrammarFormatGrammarFormat
      x-ddls-inline: true
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    HeaderParams:
      additionalProperties:
        type: string
      type: object
    HealthResponse:
      properties:
        status:
          type: string
          title: Status
      type: object
      required:
        - status
      title: HealthResponse
      description: Health check response model.
    Image:
      properties:
        url:
          anyOf:
            - type: string
            - type: 'null'
          title: Url
          description: URL of the generated image (if response_format=url)
        b64_json:
          anyOf:
            - type: string
            - type: 'null'
          title: B64 Json
          description: Base64-encoded image data (if response_format=b64_json)
        revised_prompt:
          anyOf:
            - type: string
            - type: 'null'
          title: Revised Prompt
          description: Revised prompt used for generation (dall-e-3)
      type: object
      title: Image
      description: Single image object.
    ImageGenerateRequest:
      properties:
        prompt:
          type: string
          title: Prompt
          description: >-
            A text description of the desired image(s). The maximum length is 32000 characters for
            `gpt-image-1`, 1000 characters for `dall-e-2` and 4000 characters for `dall-e-3`.
          examples:
            - A white siamese cat
        model:
          anyOf:
            - type: string
            - type: 'null'
          title: Model
          description: >-
            The model to use for image generation. One of `openai/dall-e-2`, `openai/dall-e-3`, or
            `openai/gpt-image-1`. Defaults to `openai/dall-e-2` unless a parameter specific to `gpt-image-1`
            is used.
          examples:
            - openai/dall-e-3
            - openai/dall-e-2
            - openai/gpt-image-1
        'n':
          anyOf:
            - type: integer
              maximum: 10
              minimum: 1
            - type: 'null'
          title: 'N'
          description: >-
            The number of images to generate. Must be between 1 and 10. For `dall-e-3`, only `n=1` is
            supported.
          examples:
            - 1
            - 4
        quality:
          anyOf:
            - type: string
              enum:
                - auto
                - high
                - medium
                - low
                - hd
                - standard
            - type: 'null'
          title: Quality
          description: |-
            The quality of the image that will be generated.

            - `auto` (default value) will automatically select the best quality for the given model.
            - `high`, `medium` and `low` are supported for `gpt-image-1`.
            - `hd` and `standard` are supported for `dall-e-3`.
            - `standard` is the only option for `dall-e-2`.
          examples:
            - standard
            - hd
            - high
        response_format:
          anyOf:
            - type: string
              enum:
                - url
                - b64_json
            - type: 'null'
          title: Response Format
          description: >-
            The format in which generated images with `dall-e-2` and `dall-e-3` are returned. Must be one of
            `url` or `b64_json`. URLs are only valid for 60 minutes after the image has been generated. This
            parameter isn't supported for `gpt-image-1` which will always return base64-encoded images.
          examples:
            - url
            - b64_json
        output_format:
          anyOf:
            - type: string
              enum:
                - png
                - jpeg
                - webp
            - type: 'null'
          title: Output Format
          description: >-
            The format in which the generated images are returned. This parameter is only supported for
            `gpt-image-1`. Must be one of `png`, `jpeg`, or `webp`.
          examples:
            - png
            - webp
        output_compression:
          anyOf:
            - type: integer
              maximum: 100
              minimum: 0
            - type: 'null'
          title: Output Compression
          description: >-
            The compression level (0-100%) for the generated images. This parameter is only supported for
            `gpt-image-1` with the `webp` or `jpeg` output formats, and defaults to 100.
          examples:
            - 85
            - 100
        stream:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Stream
          description: >-
            Generate the image in streaming mode. Defaults to `false`. See the

            [Image generation guide](https://platform.openai.com/docs/guides/image-generation) for more
            information.

            This parameter is only supported for `gpt-image-1`.
          examples:
            - true
            - false
        partial_images:
          anyOf:
            - type: integer
              maximum: 3
              minimum: 0
            - type: 'null'
          title: Partial Images
          description: |-
            The number of partial images to generate. This parameter is used for
            streaming responses that return partial images. Value must be between 0 and 3.
            When set to 0, the response will be a single image sent in one streaming event.

            Note that the final image may be sent before the full number of partial images
            are generated if the full image is generated more quickly.
          examples:
            - 0
            - 2
        size:
          anyOf:
            - type: string
              enum:
                - 256x256
                - 512x512
                - 1024x1024
                - 1536x1024
                - 1024x1536
                - 1792x1024
                - 1024x1792
                - auto
            - type: 'null'
          title: Size
          description: >-
            The size of the generated images. Must be one of `1024x1024`, `1536x1024` (landscape), `1024x1536`
            (portrait), or `auto` (default value) for `gpt-image-1`, one of `256x256`, `512x512`, or
            `1024x1024` for `dall-e-2`, and one of `1024x1024`, `1792x1024`, or `1024x1792` for `dall-e-3`.
          examples:
            - 1024x1024
            - 1792x1024
            - auto
        moderation:
          anyOf:
            - type: string
              enum:
                - low
                - auto
            - type: 'null'
          title: Moderation
          description: >-
            Control the content-moderation level for images generated by `gpt-image-1`. Must be either `low`
            for less restrictive filtering or `auto` (default value).
          examples:
            - auto
            - low
        background:
          anyOf:
            - type: string
              enum:
                - transparent
                - opaque
                - auto
            - type: 'null'
          title: Background
          description: |-
            Allows to set transparency for the background of the generated image(s).
            This parameter is only supported for `gpt-image-1`. Must be one of
            `transparent`, `opaque` or `auto` (default value). When `auto` is used, the
            model will automatically determine the best background for the image.

            If `transparent`, the output format needs to support transparency, so it
            should be set to either `png` (default value) or `webp`.
          examples:
            - transparent
            - opaque
            - auto
        style:
          anyOf:
            - type: string
              enum:
                - vivid
                - natural
            - type: 'null'
          title: Style
          description: >-
            The style of the generated images. This parameter is only supported for `dall-e-3`. Must be one of
            `vivid` or `natural`. Vivid causes the model to lean towards generating hyper-real and dramatic
            images. Natural causes the model to produce more natural, less hyper-real looking images.
          examples:
            - vivid
            - natural
        user:
          anyOf:
            - type: string
            - type: 'null'
          title: User
          description: >-
            A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse.
            [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids).
      type: object
      required:
        - prompt
      title: ImageGenerateRequest
      description: Request to generate images.
    ImagesResponse:
      properties:
        created:
          type: integer
          title: Created
          description: Unix timestamp when images were created
        data:
          items:
            $ref: '#/components/schemas/Image'
          type: array
          title: Data
          description: List of generated images
      type: object
      required:
        - created
        - data
      title: ImagesResponse
      description: Response from image generation.
    InputTokenDetails:
      properties:
        text_tokens:
          type: integer
          title: Text Tokens
          description: Number of text tokens billed for this request.
          x-order: 0
        audio_tokens:
          type: integer
          title: Audio Tokens
          description: Number of audio tokens billed for this request.
          x-order: 1
      type: object
      title: InputTokenDetails
      description: |-
        Details about the input tokens billed for this request.

        Fields:
          - text_tokens (optional): int
          - audio_tokens (optional): int
    JSONObject:
      additionalProperties:
        $ref: '#/components/schemas/JSONValue'
      type: object
    JSONSchema:
      properties:
        description:
          type: string
          title: Description
          description: |-
            A description of what the response format is for, used by the model to
            determine how to respond in the format.
          x-order: 0
        name:
          type: string
          title: Name
          description: |-
            The name of the response format. Must be a-z, A-Z, 0-9, or contain
            underscores and dashes, with a maximum length of 64.
          x-order: 1
        schema:
          $ref: '#/components/schemas/JSONObject'
          description: |-
            The schema for the response format, described as a JSON Schema object.
            Learn how to build JSON schemas [here](https://json-schema.org/).
          x-order: 2
        strict:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Strict
          description: |-
            Whether to enable strict schema adherence when generating the output.
            If set to true, the model will always follow the exact schema defined
            in the `schema` field. Only a subset of JSON Schema is supported when
            `strict` is `true`. To learn more, read the [Structured Outputs
            guide](https://platform.openai.com/docs/guides/structured-outputs).
          x-order: 3
      type: object
      required:
        - name
      title: JSONSchema
      description: |-
        Structured Outputs configuration options, including a JSON Schema.

        Fields:
        - description (optional): str
        - name (required): str
        - schema (optional): ResponseFormatJsonSchemaSchema
        - strict (optional): bool | None
      x-ddls-inline: true
    JSONValue:
      anyOf:
        - type: string
        - type: integer
        - type: number
        - type: boolean
        - additionalProperties:
            $ref: '#/components/schemas/JSONValue'
          type: object
        - items:
            $ref: '#/components/schemas/JSONValue'
          type: array
        - type: 'null'
    ListModelsResponse:
      properties:
        object:
          type: string
          const: list
          title: Object
          description: Response object type
          default: list
        data:
          items:
            $ref: '#/components/schemas/Model'
          type: array
          title: Data
          description: List of available models
      type: object
      required:
        - data
      title: ListModelsResponse
      description: Response for /v1/models endpoint.
    LogprobsItem:
      properties:
        token:
          type: string
          title: Token
          description: The token in the transcription.
          x-order: 0
        logprob:
          type: number
          title: Logprob
          description: The log probability of the token.
          x-order: 1
        bytes:
          items:
            type: number
          type: array
          title: Bytes
          description: The bytes of the token.
          x-order: 2
      type: object
      title: LogprobsItem
      description: |-
        Fields:
        - token (optional): str
        - logprob (optional): float
        - bytes (optional): list[float]
    MCPCredentials:
      items:
        $ref: '#/components/schemas/Credential'
      type: array
      title: MCPCredentials
      description: List of credentials for MCP server authentication.
      x-stainless-variantName: MCPCredentials
    MCPServerSpec:
      properties:
        slug:
          anyOf:
            - type: string
              pattern: ^[a-zA-Z0-9_-]+/[a-zA-Z0-9_-]+$
            - type: 'null'
          title: Slug
          description: Marketplace identifier.
        url:
          anyOf:
            - type: string
            - type: 'null'
          title: Url
          description: Direct URL to MCP server endpoint (Pro users).
        name:
          type: string
          title: Name
          description: Server instance name for credential matching.
        version:
          anyOf:
            - type: string
            - type: 'null'
          title: Version
          description: Version constraint for slug-based servers.
        credentials:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          title: Credentials
          description: >-
            Encrypted credential blobs keyed by connection name. Values are base64url ciphertext produced by
            the SDK (client-side encryption with the AS public key).
      additionalProperties: false
      type: object
      required:
        - name
      title: MCPServerSpec
      description: |-
        Structured MCP server specification.

        Slug-based: {"slug": "dedalus-labs/brave-search", "name": "github-integration", "version": "v1.0.0"}
        URL-based:  {"url": "https://mcp.dedaluslabs.ai/acme/my-server/mcp", "name": "custom-server"}
    MCPServers:
      items:
        anyOf:
          - type: string
          - $ref: '#/components/schemas/MCPServerSpec'
      type: array
      title: MCPServers
      description: List of MCP server inputs (slugs or structured specs).
      x-stainless-variantName: MCPServers
    MCPToolChoice:
      properties:
        server_label:
          type: string
          title: Server Label
        name:
          type: string
          title: Name
      type: object
      required:
        - server_label
        - name
      title: MCPToolChoice
    MCPToolResult:
      properties:
        tool_name:
          type: string
          title: Tool Name
          description: Name of the MCP tool that was executed
        server_name:
          type: string
          title: Server Name
          description: Name of the MCP server that handled the tool
        arguments:
          $ref: '#/components/schemas/JSONObject'
          description: Input arguments passed to the tool
        result:
          anyOf:
            - $ref: '#/components/schemas/JSONValue'
            - type: 'null'
          description: Structured result from the tool (parsed from structuredContent or content)
        is_error:
          type: boolean
          title: Is Error
          description: Whether the tool execution resulted in an error
        duration_ms:
          anyOf:
            - type: integer
            - type: 'null'
          title: Duration (ms)
          description: Execution time in milliseconds
      type: object
      required:
        - tool_name
        - server_name
        - arguments
        - is_error
      title: MCPToolResult
      description: |-
        Result of a single MCP tool execution.

        Provides visibility into MCP tool calls including the full input arguments
        and structured output, enabling debugging and audit trails.
    Model:
      properties:
        id:
          type: string
          title: Id
          description: Unique model identifier with provider prefix (e.g., 'openai/gpt-4')
        provider:
          type: string
          enum:
            - openai
            - anthropic
            - google
            - xai
            - mistral
            - groq
            - fireworks
            - deepseek
          title: Provider
          description: Provider that hosts this model
        created_at:
          type: string
          format: date-time
          title: Created At
          description: When the model was released (RFC 3339)
        display_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Display Name
          description: Human-readable model name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: Model description
        version:
          anyOf:
            - type: string
            - type: 'null'
          title: Version
          description: Model version identifier
        capabilities:
          anyOf:
            - $ref: '#/components/schemas/ModelCapabilities'
            - type: 'null'
          description: Normalized model capabilities
        defaults:
          anyOf:
            - $ref: '#/components/schemas/ModelDefaults'
            - type: 'null'
          description: Provider-declared default parameters
        provider_info:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Provider Info
          description: Raw provider-specific metadata
        provider_declared_generation_methods:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Provider Declared Generation Methods
          description: Provider-specific generation method names (None = not declared)
      type: object
      required:
        - id
        - provider
        - created_at
      title: Model
      description: |-
        Unified model metadata across all providers.

        Combines provider-specific schemas into a single, consistent format.
        Fields that aren't available from a provider are set to None.
    ModelCapabilities:
      properties:
        text:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Text
          description: Supports text generation
        vision:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Vision
          description: Supports image understanding
        image_generation:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Image Generation
          description: Supports image generation
        audio:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Audio
          description: Supports audio processing
        tools:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Tools
          description: Supports function/tool calling
        structured_output:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Structured Output
          description: Supports structured JSON output
        streaming:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Streaming
          description: Supports streaming responses
        thinking:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Thinking
          description: Supports extended thinking/reasoning
        input_token_limit:
          anyOf:
            - type: integer
            - type: 'null'
          title: Input Token Limit
          description: Maximum input tokens
        output_token_limit:
          anyOf:
            - type: integer
            - type: 'null'
          title: Output Token Limit
          description: Maximum output tokens
      type: object
      title: ModelCapabilities
      description: Normalized model capabilities across all providers.
    ModelDefaults:
      properties:
        temperature:
          anyOf:
            - type: number
            - type: 'null'
          title: Temperature
          description: Default temperature setting
        top_p:
          anyOf:
            - type: number
            - type: 'null'
          title: Top P
          description: Default top_p setting
        top_k:
          anyOf:
            - type: integer
            - type: 'null'
          title: Top K
          description: Default top_k setting
        max_output_tokens:
          anyOf:
            - type: integer
            - type: 'null'
          title: Max Output Tokens
          description: Default maximum output tokens
      type: object
      title: ModelDefaults
      description: Provider-declared default parameters for model generation.
    ModelId:
      type: string
      title: ModelId
      description: Model identifier string (e.g., 'openai/gpt-5', 'anthropic/claude-3-5-sonnet').
      x-stainless-variantName: ModelId
    ModelSettings:
      properties:
        temperature:
          anyOf:
            - type: number
            - type: 'null'
          title: Temperature
        top_p:
          anyOf:
            - type: number
            - type: 'null'
          title: Top P
        frequency_penalty:
          anyOf:
            - type: number
            - type: 'null'
          title: Frequency Penalty
        presence_penalty:
          anyOf:
            - type: number
            - type: 'null'
          title: Presence Penalty
        stop:
          anyOf:
            - type: string
            - items:
                type: string
              type: array
            - type: 'null'
          title: Stop
        seed:
          anyOf:
            - type: integer
            - type: 'null'
          title: Seed
        logit_bias:
          anyOf:
            - additionalProperties:
                type: integer
              type: object
            - type: 'null'
          title: Logit Bias
        logprobs:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Logprobs
        top_logprobs:
          anyOf:
            - type: integer
            - type: 'null'
          title: Top Logprobs
        'n':
          anyOf:
            - type: integer
            - type: 'null'
          title: 'N'
        user:
          anyOf:
            - type: string
            - type: 'null'
          title: User
        response_format:
          anyOf:
            - $ref: '#/components/schemas/JSONObject'
            - type: 'null'
        stream:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Stream
        stream_options:
          anyOf:
            - $ref: '#/components/schemas/JSONObject'
            - type: 'null'
        audio:
          anyOf:
            - $ref: '#/components/schemas/JSONObject'
            - type: 'null'
        service_tier:
          anyOf:
            - type: string
            - type: 'null'
          title: Service Tier
        prediction:
          anyOf:
            - $ref: '#/components/schemas/JSONObject'
            - type: 'null'
        tool_choice:
          anyOf:
            - $ref: '#/components/schemas/ToolChoice'
            - type: 'null'
        parallel_tool_calls:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Parallel Tool Calls
        truncation:
          anyOf:
            - type: string
              enum:
                - auto
                - disabled
            - type: 'null'
          title: Truncation
        max_tokens:
          anyOf:
            - type: integer
            - type: 'null'
          title: Max Tokens
        max_completion_tokens:
          anyOf:
            - type: integer
            - type: 'null'
          title: Max Completion Tokens
        reasoning:
          anyOf:
            - $ref: '#/components/schemas/Reasoning'
            - type: 'null'
        reasoning_effort:
          anyOf:
            - type: string
            - type: 'null'
          title: Reasoning Effort
        metadata:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          title: Metadata
        store:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Store
        include_usage:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Include Usage
        timeout:
          anyOf:
            - type: number
            - type: 'null'
          title: Timeout
        prompt_cache_key:
          anyOf:
            - type: string
            - type: 'null'
          title: Prompt Cache Key
        safety_identifier:
          anyOf:
            - type: string
            - type: 'null'
          title: Safety Identifier
        verbosity:
          anyOf:
            - type: string
            - type: 'null'
          title: Verbosity
        web_search_options:
          anyOf:
            - $ref: '#/components/schemas/JSONObject'
            - type: 'null'
        extra_query:
          anyOf:
            - $ref: '#/components/schemas/QueryParams'
            - type: 'null'
        extra_headers:
          anyOf:
            - $ref: '#/components/schemas/HeaderParams'
            - type: 'null'
        extra_args:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Extra Args
        attributes:
          additionalProperties: true
          type: object
          title: Attributes
        voice:
          anyOf:
            - type: string
            - type: 'null'
          title: Voice
        modalities:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Modalities
        input_audio_format:
          anyOf:
            - type: string
            - type: 'null'
          title: Input Audio Format
        output_audio_format:
          anyOf:
            - type: string
            - type: 'null'
          title: Output Audio Format
        input_audio_transcription:
          anyOf:
            - $ref: '#/components/schemas/JSONObject'
            - type: 'null'
        turn_detection:
          anyOf:
            - $ref: '#/components/schemas/JSONObject'
            - type: 'null'
        thinking:
          anyOf:
            - $ref: '#/components/schemas/JSONObject'
            - type: 'null'
        top_k:
          anyOf:
            - type: integer
            - type: 'null'
          title: Top K
        generation_config:
          anyOf:
            - $ref: '#/components/schemas/JSONObject'
            - type: 'null'
        system_instruction:
          anyOf:
            - $ref: '#/components/schemas/JSONObject'
            - type: 'null'
        safety_settings:
          anyOf:
            - items:
                $ref: '#/components/schemas/JSONObject'
              type: array
            - type: 'null'
          title: Safety Settings
        tool_config:
          anyOf:
            - $ref: '#/components/schemas/JSONObject'
            - type: 'null'
        search_parameters:
          anyOf:
            - $ref: '#/components/schemas/JSONObject'
            - type: 'null'
        deferred:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Deferred
        structured_output:
          anyOf:
            - {}
            - type: 'null'
          title: Structured Output
          x-stainless-any: true
      type: object
      title: ModelSettings
    PredictionContent:
      properties:
        type:
          type: string
          const: content
          title: Type
          description: |-
            The type of the predicted content you want to provide. This type is
            currently always `content`.
          x-order: 0
        content:
          anyOf:
            - type: string
            - items:
                $ref: '#/components/schemas/ChatCompletionRequestMessageContentPartText'
              type: array
              minItems: 1
              title: PredictionContentArray
          title: Content
          description: |-
            The content that should be matched when generating a model response.
            If generated tokens would match this content, the entire model response
            can be returned much more quickly.
          x-order: 1
      type: object
      required:
        - type
        - content
      title: PredictionContent
      description: >-
        Static predicted output content, such as the content of a text file that is

        being regenerated.


        Fields:

        - type (required): Literal["content"]

        - content (required): str | Annotated[list[ChatCompletionRequestMessageContentPartText], MinLen(1),
        ArrayTitle("PredictionContentArray")]
    PromptTokensDetails:
      properties:
        audio_tokens:
          type: integer
          title: Audio Tokens
          description: Audio input tokens present in the prompt.
          default: 0
          x-order: 0
        cached_tokens:
          type: integer
          title: Cached Tokens
          description: Cached tokens present in the prompt.
          default: 0
          x-order: 1
      type: object
      title: PromptTokensDetails
      description: |-
        Breakdown of tokens used in the prompt.

        Fields:
        - audio_tokens (optional): int
        - cached_tokens (optional): int
      x-ddls-inline: true
    QueryParams:
      additionalProperties: true
      type: object
    Reasoning:
      properties:
        effort:
          anyOf:
            - type: string
              enum:
                - none
                - minimal
                - low
                - medium
                - high
                - xhigh
            - type: 'null'
          title: Effort
        generate_summary:
          anyOf:
            - type: string
              enum:
                - auto
                - concise
                - detailed
            - type: 'null'
          title: Generate Summary
        summary:
          anyOf:
            - type: string
              enum:
                - auto
                - concise
                - detailed
            - type: 'null'
          title: Summary
      additionalProperties: true
      type: object
      title: Reasoning
      description: |-
        **gpt-5 and o-series models only**

        Configuration options for
        [reasoning models](https://platform.openai.com/docs/guides/reasoning).
    ResponseFormatJsonObject:
      properties:
        type:
          type: string
          const: json_object
          title: Type
          description: The type of response format being defined. Always `json_object`.
          x-order: 0
      type: object
      required:
        - type
      title: ResponseFormatJsonObject
      description: |-
        JSON object response format. An older method of generating JSON responses.
        Using `json_schema` is recommended for models that support it. Note that the
        model will not generate JSON without a system or user message instructing it
        to do so.

        Fields:
        - type (required): Literal["json_object"]
    ResponseFormatJsonSchema:
      properties:
        type:
          type: string
          const: json_schema
          title: Type
          description: The type of response format being defined. Always `json_schema`.
          x-order: 0
        json_schema:
          $ref: '#/components/schemas/JSONSchema'
          description: Structured Outputs configuration options, including a JSON Schema.
          x-order: 1
      type: object
      required:
        - type
        - json_schema
      title: ResponseFormatJsonSchema
      description: |-
        JSON Schema response format. Used to generate structured JSON responses.
        Learn more about [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs).

        Fields:
        - type (required): Literal["json_schema"]
        - json_schema (required): JSONSchema
    ResponseFormatText:
      properties:
        type:
          type: string
          const: text
          title: Type
          description: The type of response format being defined. Always `text`.
          x-order: 0
      type: object
      required:
        - type
      title: ResponseFormatText
      description: |-
        Default response format. Used to generate text responses.

        Fields:
        - type (required): Literal["text"]
    RootResponse:
      properties:
        message:
          type: string
          title: Message
      type: object
      required:
        - message
      title: RootResponse
      description: Response model for the root endpoint of the Dedalus API.
    SafetySetting:
      properties:
        category:
          type: string
          enum:
            - HARM_CATEGORY_UNSPECIFIED
            - HARM_CATEGORY_DEROGATORY
            - HARM_CATEGORY_TOXICITY
            - HARM_CATEGORY_VIOLENCE
            - HARM_CATEGORY_SEXUAL
            - HARM_CATEGORY_MEDICAL
            - HARM_CATEGORY_DANGEROUS
            - HARM_CATEGORY_HARASSMENT
            - HARM_CATEGORY_HATE_SPEECH
            - HARM_CATEGORY_SEXUALLY_EXPLICIT
            - HARM_CATEGORY_DANGEROUS_CONTENT
            - HARM_CATEGORY_CIVIC_INTEGRITY
          title: Category
          description: Required. The category for this setting.
          x-order: 0
        threshold:
          type: string
          enum:
            - HARM_BLOCK_THRESHOLD_UNSPECIFIED
            - BLOCK_LOW_AND_ABOVE
            - BLOCK_MEDIUM_AND_ABOVE
            - BLOCK_ONLY_HIGH
            - BLOCK_NONE
            - 'OFF'
          title: Threshold
          description: Required. Controls the probability threshold at which harm is blocked.
          x-order: 1
      type: object
      required:
        - category
        - threshold
      title: SafetySetting
      description: >-
        Safety setting, affecting the safety-blocking behavior.


        Passing a safety setting for a category changes the allowed probability that

        content is blocked.


        Fields:

        - category (required): HarmCategory

        - threshold (required): Literal["HARM_BLOCK_THRESHOLD_UNSPECIFIED", "BLOCK_LOW_AND_ABOVE",
        "BLOCK_MEDIUM_AND_ABOVE", "BLOCK_ONLY_HIGH", "BLOCK_NONE", "OFF"]
    TextFormat:
      properties:
        type:
          type: string
          const: text
          title: Type
          description: Unconstrained text format. Always `text`.
          x-order: 0
      type: object
      required:
        - type
      title: TextFormat
      description: |-
        Unconstrained free-form text.

        Fields:
        - type (required): Literal["text"]
      x-ddls-inline: true
    ThinkingConfigDisabled:
      properties:
        type:
          type: string
          const: disabled
          title: Type
          x-order: 0
      type: object
      required:
        - type
      title: ThinkingConfigDisabled
      description: |-
        Schema for ThinkingConfigDisabled.

        Fields:
        - type (required): Literal["disabled"]
    ThinkingConfigEnabled:
      properties:
        budget_tokens:
          type: integer
          minimum: 1024
          title: Budget Tokens
          description: >-
            Determines how many tokens Claude can use for its internal reasoning process. Larger budgets can
            enable more thorough analysis for complex problems, improving response quality.


            Must be ≥1024 and less than `max_tokens`.


            See [extended thinking](https://docs.claude.com/en/docs/build-with-claude/extended-thinking) for
            details.
          x-order: 0
        type:
          type: string
          const: enabled
          title: Type
          x-order: 1
      type: object
      required:
        - budget_tokens
        - type
      title: ThinkingConfigEnabled
      description: |-
        Schema for ThinkingConfigEnabled.

        Fields:
        - budget_tokens (required): int
        - type (required): Literal["enabled"]
    ToolChoice:
      anyOf:
        - type: string
          enum:
            - auto
            - required
            - none
        - type: string
        - additionalProperties: true
          type: object
        - $ref: '#/components/schemas/MCPToolChoice'
        - type: 'null'
    ToolChoiceAny:
      properties:
        disable_parallel_tool_use:
          type: boolean
          title: Disable Parallel Tool Use
          description: |-
            Whether to disable parallel tool use.

            Defaults to `false`. If set to `true`, the model will output exactly one tool use.
          x-order: 0
        type:
          type: string
          const: any
          title: Type
          x-order: 1
      type: object
      required:
        - type
      title: ToolChoiceAny
      description: |-
        The model will use any available tools.

        Fields:
        - disable_parallel_tool_use (optional): bool
        - type (required): Literal["any"]
    ToolChoiceAuto:
      properties:
        disable_parallel_tool_use:
          type: boolean
          title: Disable Parallel Tool Use
          description: |-
            Whether to disable parallel tool use.

            Defaults to `false`. If set to `true`, the model will output at most one tool use.
          x-order: 0
        type:
          type: string
          const: auto
          title: Type
          x-order: 1
      type: object
      required:
        - type
      title: ToolChoiceAuto
      description: |-
        The model will automatically decide whether to use tools.

        Fields:
        - disable_parallel_tool_use (optional): bool
        - type (required): Literal["auto"]
    ToolChoiceNone:
      properties:
        type:
          type: string
          const: none
          title: Type
          x-order: 0
      type: object
      required:
        - type
      title: ToolChoiceNone
      description: |-
        The model will not be allowed to use tools.

        Fields:
        - type (required): Literal["none"]
    ToolChoiceTool:
      properties:
        disable_parallel_tool_use:
          type: boolean
          title: Disable Parallel Tool Use
          description: |-
            Whether to disable parallel tool use.

            Defaults to `false`. If set to `true`, the model will output exactly one tool use.
          x-order: 0
        name:
          type: string
          title: Name
          description: The name of the tool to use.
          x-order: 1
        type:
          type: string
          const: tool
          title: Type
          x-order: 2
      type: object
      required:
        - name
        - type
      title: ToolChoiceTool
      description: |-
        The model will use the specified tool with `tool_choice.name`.

        Fields:
        - disable_parallel_tool_use (optional): bool
        - name (required): str
        - type (required): Literal["tool"]
    TranscriptTextUsageDuration:
      properties:
        type:
          type: string
          const: duration
          title: Type
          description: The type of the usage object. Always `duration` for this variant.
          x-order: 0
        seconds:
          type: number
          title: Seconds
          description: Duration of the input audio in seconds.
          x-order: 1
      type: object
      required:
        - type
        - seconds
      title: TranscriptTextUsageDuration
      description: |-
        Usage statistics for models billed by audio input duration.

        Fields:
          - type (required): Literal['duration']
          - seconds (required): float
    TranscriptTextUsageTokens:
      properties:
        type:
          type: string
          const: tokens
          title: Type
          description: The type of the usage object. Always `tokens` for this variant.
          x-order: 0
        input_tokens:
          type: integer
          title: Input Tokens
          description: Number of input tokens billed for this request.
          x-order: 1
        input_token_details:
          $ref: '#/components/schemas/InputTokenDetails'
          description: Details about the input tokens billed for this request.
          x-order: 2
        output_tokens:
          type: integer
          title: Output Tokens
          description: Number of output tokens generated.
          x-order: 3
        total_tokens:
          type: integer
          title: Total Tokens
          description: Total number of tokens used (input + output).
          x-order: 4
      type: object
      required:
        - type
        - input_tokens
        - output_tokens
        - total_tokens
      title: TranscriptTextUsageTokens
      description: |-
        Usage statistics for models billed by token usage.

        Fields:
          - type (required): Literal['tokens']
          - input_tokens (required): int
          - input_token_details (optional): InputTokenDetails
          - output_tokens (required): int
          - total_tokens (required): int
    TranscriptionSegment:
      properties:
        id:
          type: integer
          title: Id
          description: Unique identifier of the segment.
          x-order: 0
        seek:
          type: integer
          title: Seek
          description: Seek offset of the segment.
          x-order: 1
        start:
          type: number
          title: Start
          description: Start time of the segment in seconds.
          x-order: 2
        end:
          type: number
          title: End
          description: End time of the segment in seconds.
          x-order: 3
        text:
          type: string
          title: Text
          description: Text content of the segment.
          x-order: 4
        tokens:
          items:
            type: integer
          type: array
          title: Tokens
          description: Array of token IDs for the text content.
          x-order: 5
        temperature:
          type: number
          title: Temperature
          description: Temperature parameter used for generating the segment.
          x-order: 6
        avg_logprob:
          type: number
          title: Avg Logprob
          description: Average logprob of the segment. If the value is lower than -1, consider the logprobs failed.
          x-order: 7
        compression_ratio:
          type: number
          title: Compression Ratio
          description: >-
            Compression ratio of the segment. If the value is greater than 2.4, consider the compression
            failed.
          x-order: 8
        no_speech_prob:
          type: number
          title: No Speech Prob
          description: >-
            Probability of no speech in the segment. If the value is higher than 1.0 and the `avg_logprob` is
            below -1, consider this segment silent.
          x-order: 9
      type: object
      required:
        - id
        - seek
        - start
        - end
        - text
        - tokens
        - temperature
        - avg_logprob
        - compression_ratio
        - no_speech_prob
      title: TranscriptionSegment
      description: |-
        Fields:
        - id (required): int
        - seek (required): int
        - start (required): float
        - end (required): float
        - text (required): str
        - tokens (required): list[int]
        - temperature (required): float
        - avg_logprob (required): float
        - compression_ratio (required): float
        - no_speech_prob (required): float
    TranscriptionWord:
      properties:
        word:
          type: string
          title: Word
          description: The text content of the word.
          x-order: 0
        start:
          type: number
          title: Start
          description: Start time of the word in seconds.
          x-order: 1
        end:
          type: number
          title: End
          description: End time of the word in seconds.
          x-order: 2
      type: object
      required:
        - word
        - start
        - end
      title: TranscriptionWord
      description: |-
        Fields:
        - word (required): str
        - start (required): float
        - end (required): float
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    ChatCompletionMessageToolCallChunk:
      description: |-
        Schema for ChatCompletionMessageToolCallChunk.

        Fields:
        - index (required): int
        - id (optional): str
        - type (optional): Literal["function"]
        - function (optional): ChatCompletionMessageToolCallChunkFunction
      properties:
        index:
          title: Index
          type: integer
          x-order: 0
        id:
          default: null
          description: The ID of the tool call.
          title: Id
          type: string
          x-order: 1
        type:
          const: function
          default: null
          description: The type of the tool. Currently, only `function` is supported.
          title: Type
          type: string
          x-order: 2
        function:
          description: |-
            Schema for ChatCompletionMessageToolCallChunkFunction.

            Fields:
            - name (optional): str
            - arguments (optional): str
          properties:
            name:
              default: null
              description: The name of the function to call.
              title: Name
              type: string
              x-order: 0
            arguments:
              default: null
              description: >-
                The arguments to call the function with, as generated by the model in JSON format. Note that
                the model does not always generate valid JSON, and may hallucinate parameters not defined by
                your function schema. Validate the arguments in your code before calling your function.
              title: Arguments
              type: string
              x-order: 1
          type: object
      required:
        - index
      title: ChatCompletionMessageToolCallChunk
      type: object
    ChatCompletionStreamResponseDelta:
      description: |-
        A chat completion delta generated by streamed model responses.

        Fields:
        - content (optional): str | None
        - function_call (optional): ChatCompletionStreamResponseDeltaFunctionCall
        - tool_calls (optional): list[ChatCompletionMessageToolCallChunk]
        - role (optional): Literal["developer", "system", "user", "assistant", "tool"]
        - refusal (optional): str | None
      properties:
        content:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: The contents of the chunk message.
          title: Content
          x-order: 0
        function_call:
          description: >-
            Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be
            called, as generated by the model.


            Fields:

            - arguments (optional): str

            - name (optional): str
          properties:
            arguments:
              default: null
              description: >-
                The arguments to call the function with, as generated by the model in JSON format. Note that
                the model does not always generate valid JSON, and may hallucinate parameters not defined by
                your function schema. Validate the arguments in your code before calling your function.
              title: Arguments
              type: string
              x-order: 0
            name:
              default: null
              description: The name of the function to call.
              title: Name
              type: string
              x-order: 1
          type: object
        tool_calls:
          default: null
          items:
            $ref: '#/components/schemas/ChatCompletionMessageToolCallChunk'
          title: Tool Calls
          type: array
          x-order: 2
        role:
          default: null
          description: The role of the author of this message.
          enum:
            - developer
            - system
            - user
            - assistant
            - tool
          title: Role
          type: string
          x-order: 3
        refusal:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: The refusal message generated by the model.
          title: Refusal
          x-order: 4
      title: ChatCompletionStreamResponseDelta
      type: object
    CreateChatCompletionStreamResponseChoicesItem:
      description: |-
        Schema for CreateChatCompletionStreamResponseChoicesItem.

        Fields:
        - delta (required): ChatCompletionStreamResponseDelta
        - logprobs (optional): CreateChatCompletionStreamResponseChoicesItemLogprobs
        - finish_reason (required): Literal["stop", "length", "tool_calls", "content_filter", "function_call"]
        - index (required): int
      properties:
        delta:
          $ref: '#/components/schemas/ChatCompletionStreamResponseDelta'
          description: A chat completion delta generated by streamed model responses.
          x-order: 0
        logprobs:
          anyOf:
            - $ref: '#/components/schemas/CreateChatCompletionStreamResponseChoicesItemLogprobs'
            - type: 'null'
          default: null
          description: Log probability information for the choice.
          x-order: 1
        finish_reason:
          description: >-
            The reason the model stopped generating tokens. This will be `stop` if the model hit a natural
            stop point or a provided stop sequence,

            `length` if the maximum number of tokens specified in the request was reached,

            `content_filter` if content was omitted due to a flag from our content filters,

            `tool_calls` if the model called a tool, or `function_call` (deprecated) if the model called a
            function.
          enum:
            - stop
            - length
            - tool_calls
            - content_filter
            - function_call
          title: Finish Reason
          type: string
          x-order: 2
        index:
          description: The index of the choice in the list of choices.
          title: Index
          type: integer
          x-order: 3
      required:
        - delta
        - finish_reason
        - index
      title: CreateChatCompletionStreamResponseChoicesItem
      type: object
      x-ddls-inline: true
    CreateChatCompletionStreamResponseChoicesItemLogprobs:
      description: |-
        Log probability information for the choice.

        Fields:
        - content (required): list[ChatCompletionTokenLogprob]
        - refusal (required): list[ChatCompletionTokenLogprob]
      properties:
        content:
          description: A list of message content tokens with log probability information.
          items:
            $ref: '#/components/schemas/ChatCompletionTokenLogprob'
          title: Content
          type: array
          x-order: 0
        refusal:
          description: A list of message refusal tokens with log probability information.
          items:
            $ref: '#/components/schemas/ChatCompletionTokenLogprob'
          title: Refusal
          type: array
          x-order: 1
      required:
        - content
        - refusal
      title: CreateChatCompletionStreamResponseChoicesItemLogprobs
      type: object
      x-ddls-inline: true
    CreateChatCompletionStreamResponse:
      description: |-
        Represents a streamed chunk of a chat completion response returned
        by the model, based on the provided input. 
        [Learn more](https://platform.openai.com/docs/guides/streaming-responses).

        Fields:
        - id (required): str
        - choices (required): list[CreateChatCompletionStreamResponseChoicesItem]
        - created (required): int
        - model (required): str
        - service_tier (optional): ServiceTier
        - system_fingerprint (optional): str
        - object (required): Literal["chat.completion.chunk"]
        - usage (optional): CompletionUsage
      properties:
        id:
          description: A unique identifier for the chat completion. Each chunk has the same ID.
          title: Id
          type: string
          x-order: 0
        choices:
          description: >-
            A list of chat completion choices. Can contain more than one elements if `n` is greater than 1.
            Can also be empty for the

            last chunk if you set `stream_options: {"include_usage": true}`.
          items:
            $ref: '#/components/schemas/CreateChatCompletionStreamResponseChoicesItem'
          title: Choices
          type: array
          x-order: 1
        created:
          description: >-
            The Unix timestamp (in seconds) of when the chat completion was created. Each chunk has the same
            timestamp.
          title: Created
          type: integer
          x-order: 2
        model:
          description: The model to generate the completion.
          title: Model
          type: string
          x-order: 3
        service_tier:
          anyOf:
            - enum:
                - auto
                - default
                - flex
                - scale
                - priority
              type: string
            - type: 'null'
          default: null
          description: |-
            Specifies the processing type used for serving the request.
              - If set to 'auto', then the request will be processed with the service tier configured in the Project settings. Unless otherwise configured, the Project will use 'default'.
              - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model.
              - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)' or '[priority](https://openai.com/api-priority-processing/)', then the request will be processed with the corresponding service tier.
              - When not set, the default behavior is 'auto'.

              When the `service_tier` parameter is set, the response body will include the `service_tier` value based on the processing mode actually used to serve the request. This response value may be different from the value set in the parameter.
          title: Service Tier
          x-order: 4
        system_fingerprint:
          default: null
          description: >-
            This fingerprint represents the backend configuration that the model runs with.

            Can be used in conjunction with the `seed` request parameter to understand when backend changes
            have been made that might impact determinism.
          title: System Fingerprint
          type: string
          x-order: 5
        object:
          const: chat.completion.chunk
          description: The object type, which is always `chat.completion.chunk`.
          title: Object
          type: string
          x-order: 6
        usage:
          anyOf:
            - $ref: '#/components/schemas/CompletionUsage'
            - type: 'null'
          default: null
          description: |-
            An optional field that will only be present when you set
            `stream_options: {"include_usage": true}` in your request. When present, it
            contains a null value **except for the last chunk** which contains the
            token usage statistics for the entire request.

            **NOTE:** If the stream is interrupted or cancelled, you may not
            receive the final usage chunk which contains the total token usage for
            the request.
          x-order: 7
      required:
        - id
        - choices
        - created
        - model
        - object
      title: CreateChatCompletionStreamResponse
      type: object
  securitySchemes:
    Bearer:
      type: http
      scheme: bearer
