Skip to main content
Bring models hosted on Fireworks into your Labelbox workflows through a custom model integration. Use Fireworks for inference and Labelbox Foundry to select data, configure prompts, inspect predictions, and send results for human review. Fireworks provides access to open models through an OpenAI-compatible API, with serverless and dedicated deployment options. This guide focuses on text generation with the Chat Completions API.

What you can build

  • Response generation: Generate responses on your own datasets and review how a model handles domain-specific questions.
  • Data enrichment: Summarize documents, extract information, or categorize text before further curation.
  • Model-assisted labeling: Generate candidate labels, then send predictions to Annotate for human review and correction.
  • Model comparison: Run different Fireworks-hosted models on the same data to compare output quality for your use case.

Before you begin

You need:
  • A Labelbox enterprise plan with access to custom model integrations. Contact sales for plan options.
  • A Fireworks account, an API key, and access to a text-generation model.
  • Data in Labelbox Catalog and, for labeling tasks, an ontology that defines the expected predictions.
  • An HTTPS adapter endpoint that you host and make accessible to Labelbox.
Fireworks’ OpenAI-compatible API and Labelbox’s custom model endpoint use different request and response formats. Register your adapter URL in Labelbox, not the Fireworks Chat Completions URL. The adapter translates requests, calls Fireworks, and returns predictions in Labelbox’s expected format.

Set up Fireworks

  1. Sign in to Fireworks and create an API key.
  2. Choose a model from the Fireworks model library. Copy its full model identifier from the model’s API example rather than its display name.
  3. Confirm that the model is available through serverless inference, or create a dedicated deployment and use the model identifier supplied for that deployment.
  4. Store the API key as a secret in your adapter’s hosting environment. Do not put it in prompts, data rows, or client-side code.

Check access to your model

Use a small request to verify your Fireworks credentials and model selection before connecting Labelbox. Set FIREWORKS_API_KEY and FIREWORKS_MODEL in your local environment; use the exact model identifier from Fireworks.
This example requires curl and jq. A successful response includes generated text in choices[0].message.content. This check calls Fireworks directly; it does not test your Labelbox adapter. Fireworks usage is subject to your account’s billing and rate limits.

Connect the APIs with an adapter

The integration follows this request path:
Configure your adapter with these Fireworks settings:

Translate the request

Labelbox sends messages in prompt, with each message containing a role and ordered parts. For a text-only integration, map each message to a Fireworks messages entry, preserve its role, and combine its text parts in order. For example, this Labelbox request:
becomes a Fireworks request with this message list, plus your configured model and generation parameters:
Validate incoming payloads and reject unsupported input types rather than silently dropping them. This text-only mapping does not handle image parts. To use a vision-capable Fireworks model, extend the adapter to translate images into the model’s supported input format.

Return a Labelbox prediction

Extract the generated text from choices[0].message.content. Return the prediction format required by your Labelbox task, not the full Fireworks response object. For an ontology with a free-text feature named summary, an adapter can return a prediction shaped like this:
The key must match the feature name in your ontology. For radio or checklist classifications, validate that generated labels match the ontology’s allowed values. See the custom model response formats for other task types. Before deploying the adapter, configure authentication, request timeouts, and error handling. Keep the Fireworks API key on the server. Surface upstream failures as errors rather than saving an error message as a successful prediction, and use bounded retries with backoff for transient failures or rate limits.

Add the model to Labelbox

  1. Open Models, click Create, and select Custom Model.
  2. Select the data type supported by your adapter. For this text-only workflow, use text data.
  3. Give the model a descriptive name, such as Fireworks — document summarization.
  4. Set HTTP endpoint to your deployed adapter URL.
  5. If your adapter requires a secret, configure Secret for the adapter’s authentication. This is separate from the Fireworks API key stored by your adapter.
  6. Add a description that records the Fireworks model identifier and intended task, then click Create model.
On the model’s Settings tab, document the supported inputs and outputs in its Readme. Set a rate limit appropriate for your adapter capacity and Fireworks account limits. When changing models, verify the new model’s context length, input support, and generation parameters before running it on a full dataset.

Generate and review predictions

  1. Click + Model run on your custom model and select a small set of representative data rows.
  2. Configure the prompt and, when required, select an ontology that matches your adapter’s output.
  3. Generate a preview and confirm that the predictions contain the expected text or labels.
  4. Submit the model run, then inspect predictions in Catalog.
  5. Send predictions to Annotate for human review, or export predictions for downstream workflows.
For model comparisons, keep the dataset, prompt, and output schema consistent across runs. Record the Fireworks model identifier and adapter configuration so you can interpret the results later.
Bounding box and mask tasks are not supported by the self-serve custom model integration flow. See custom integrations for bounding box and mask tasks for the separate onboarding process.

Troubleshooting

Next steps

Fireworks documentation

Explore model availability, deployment options, and API configuration.

Custom model integration

Review the complete Labelbox endpoint contract and supported prediction formats.